mirror of
https://github.com/rebane2001/hobune
synced 2024-11-26 12:01:06 +01:00
39 lines
1.4 KiB
Markdown
39 lines
1.4 KiB
Markdown
# 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
|
|
1. Clone this repo (or download as zip).
|
|
2. Rename the `default.json` file to `config.json` and edit the `ytpath`, `ytpathweb`, `webpath`, `outpath` and `removedvideosfile` variables to suit your setup.
|
|
3. Run `python3 hobune.py`, this will generate HTML files in your `outpath`.
|
|
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.
|
|
|
|
# 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`.
|