mirror of
https://github.com/rebane2001/hobune
synced 2024-11-26 12:01:06 +01:00
1.4 KiB
1.4 KiB
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)
- Watch page (with stats, description etc)
- Download buttons (video, description, thumbnail, subtitles)
- Highlight deleted videos
- Client-side search
Usage
- Clone this repo (or download as zip).
- Rename the
default.json
file toconfig.json
and edit theytpath
,ytpathweb
,webpath
,outpath
andremovedvideosfile
variables to suit your setup. - Run
python3 hobune.py
, this will generate HTML files in youroutpath
. - (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.
Notes (2022)
This codebase is a bit of a mess at the moment and I need to clean it up and refactor it at some point. Windows is not supported without code changes, although it can be made to work.
I've also added my comments code to this repo in an unorganized fashion. It is disabled by default, if you'd like to use it please read the contents of comments.py
.