1
mirror of https://github.com/rebane2001/hobune synced 2025-03-10 07:44:28 +01:00
2024-08-19 00:26:40 +03:00
2023-05-11 17:48:26 +03:00
2024-08-19 00:26:40 +03:00
2023-05-11 16:42:41 +03:00
2024-08-02 17:17:00 +03:00
2023-05-09 14:10:11 +03:00
e
2023-05-09 14:19:51 +03:00
2023-05-11 18:47:21 +03:00
2023-05-11 16:42:41 +03:00
2020-08-04 23:34:16 +03:00
2023-05-11 17:16:46 +03:00

Hobune

A lightweight static HTML generator for self-hosting yt-dlp video archives.

Features

  • Static HTML (fast and secure)
  • Parses yt-dlp info.json format
  • Channel pages (with thumbnails, name history)
  • Watch page (with stats, description etc)
  • Download buttons (video, description, thumbnail, subtitles)
  • Highlight deleted/unlisted videos
  • Client-side search/sorting

Usage

  1. Clone this repo (or download as zip).

  2. Rename the default.json file to config.json and edit the variables to suit your setup:

    • site_name: Name/Title of the site (e.g. "Hobune")
    • files_path: Local path of the video files (e.g. "/var/www/html/files/")
    • files_web_path: Web path of the video files (e.g. "/files/" or "https://example.com/files/")
    • web_root: Web root path (e.g. "/" or "https://example.com/")
    • output_path: Output path for the HTML files (e.g. "/var/www/html/")
    • add_html_ext: Add HTML extension to links (e.g. link to /videos/foobar.html instead of /videos/foobar)
    • removed_videos_file: A text file where each line ends with a removed video ID (optional, e.g. "~/removed_videos.txt")
    • unlisted_videos_file: Unlisted videos file - similar to the removed videos file (optional)
  3. Run python3 hobune.py, this will generate HTML files in your output_path.

  4. (optionally) Configure your webserver to allow downloads from /dl URLs and HTML pages without extensions.

# nginx sample config

location / {
    try_files $uri.html $uri $uri/ =404;
}

location /dl {
    alias /var/www/html/;
    add_header Content-disposition "attachment; filename=$1";
    try_files $uri $uri/ =404;
}

It is also recommended to edit the python script to suit your exact needs, since your setup probably won't be 1:1 same as the expected one.

Description
No description provided
Readme LGPL-2.1 179 KiB
Languages
Python 70.2%
CSS 16%
JavaScript 7.4%
HTML 6.4%