autotako

Service to monitor moombox for completed livestream downloads to upload for distribution
git clone https://code.alwayswait.ing/autotako
Log | Files | Refs | README

README.md (3130B)


      1 # autotako
      2 
      3 autotako is a daemon to facilitate distributions of downloaded livestreams.
      4 
      5 This is specifically tailored to the stack used on https://archives.alwayswait.ing/, which is
      6 powered by the following:
      7 
      8 - [moombox][], which manages YouTube streams to download and provides an API to monitor status
      9 - [dufs][], which powers the public-facing file browser and exposes a WebDAV interface to punt
     10 files to (aside: guests also have read-only access via WebDAV; note that Windows does not take
     11 kindly to colons in filenames)
     12 - [qbittorrent][] (specifically the "no x" release packaged by stable Debian)
     13 
     14 [moombox]: https://github.com/nosoop/moombox
     15 [dufs]: https://github.com/sigoden/dufs
     16 [qbittorrent]: https://packages.debian.org/bookworm/qbittorrent-nox
     17 
     18 Of those, dufs is the only application that needs to be exposed to the web (and in the author's
     19 case, is running on a public VPS; the others are running together behind a firewalled system).
     20 
     21 ## Setup
     22 
     23 Again, you probably don't need to run this unless you want to distribute streams for some
     24 reason.  If you want an interface to archive streams for yourself, all you need is [moombox][].
     25 
     26 1. Install and configure the dependencies.  This project expects a working moombox instance, but
     27 that is not specified as a package dependency since it'll operate as a completely separate
     28 service.
     29 2. Install autotako in a virtual environment.  (Only tested in editable mode.)
     30 3. Copy the `config.example.toml` to `config.toml`, and make adjustments as needed.
     31 4. Run `autotako`.  Note that the `config.toml` needs to be in the process's working directory.
     32   - There are additional options; `autotako --help` for a list.
     33 
     34 ## Operation
     35 
     36 autotako displays a page for each moombox task; the following operations are available:
     37 
     38 - Clicking on the stream title takes you to the moombox page for that task.
     39 - Clicking on the 'edit' icon for the torrent name in the second column lets you adjust upload
     40 info and add a note to the upload.  The tool tries to set the name based on known keywords,
     41 falling back to extraction based on standardized Japanese livestreaming 'topic' syntax.
     42   - The upload info should be set before the upload is started.
     43   - autotako is hardcoded to upload items that contain specific terms by default.
     44 - The icons in the last column are as follows:
     45   - The stopwatch is lit if the system will automatically perform an upload.
     46   - The upload button can be clicked to force-start an upload.  Uploads are an idempotent
     47   operation; if one is ongoing clicking this will wait on an existing upload task.
     48     - If a warning icon is present, the system is not configured to upload for the given
     49     channel, and no upload can be performed.
     50     - If the icon is a checkbox, clicking it *will* force a reupload of files.  Torrents are not
     51     regenerated.
     52 
     53 autotako polls moombox every two minutes, then automatically uploads the contents of any
     54 completed task that meets the upload criteria.
     55 
     56 (I've seen the polling fail before, though...)
     57 
     58 ## Maintenance
     59 
     60 YouTube may break the download process moombox uses at any point.  moombox's schema may also
     61 change at any point.