1
mirror of https://github.com/rebane2001/hobune synced 2024-11-22 15:53:59 +01:00
Go to file
2023-05-09 14:10:11 +03:00
custom Added external config, added custom page support, fixed bugs 2020-11-11 16:08:36 +02:00
note Backport notes from private 2022-05-23 11:54:02 +03:00
templates Comments support 2022-10-22 19:22:42 +03:00
.gitignore Updated gitignore 2023-05-09 14:10:11 +03:00
comments.py Comments support 2022-10-22 19:22:42 +03:00
default.json Unlisted videos support 2022-10-22 19:01:35 +03:00
hobune_v2.md Create hobune_v2.md 2023-05-09 12:10:51 +03:00
hobune.py Don't use @handles 2023-03-04 14:58:40 +02:00
LICENSE Initial commit 2020-08-04 23:34:16 +03:00
README.md Comments support 2022-10-22 19:22:42 +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)
  • 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.