1.4.0-beta: add audio captures (audio metadata isn't quite working yet in eggbug-rs fork)

This commit is contained in:
xenofem 2023-07-30 00:50:53 -04:00
parent 4ec1794403
commit 47eb454f0c
7 changed files with 219 additions and 82 deletions

View file

@ -1,7 +1,8 @@
# screencap-bot
this is a cohost bot that periodically posts randomly-chosen
screencaps from a configured collection of tv series/movies.
screencaps or audio clips from a configured collection of tv
series/movies/podcasts/etc.
## installation
@ -17,15 +18,19 @@ screencap-bot is configured with the following environment variables,
which can also be put in a `.env` file in the program's working
directory:
- `SCREENCAP_BOT_SHOWS_FILE`: path of a YAML file specifying what shows to take screencaps from (default: `./shows.yaml`)
- `SCREENCAP_BOT_CAPTURE_IMAGES`: whether to take screenshots (default: `true`)
- `SCREENCAP_BOT_CAPTURE_AUDIO_DURATION`: length of audio clips to capture, in seconds (default: unset, no audio capture)
- `SCREENCAP_BOT_SHOWS_FILE`: path of a YAML file specifying what shows to take captures from (default: `./shows.yaml`)
- `SCREENCAP_BOT_GLOBAL_TAGS`: tags to put on every post the bot makes, as a comma-separated list (eg `bot account,automated post,The Cohost Bot Feed`) (default: none)
- `SCREENCAP_BOT_POST_INTERVAL`: the interval between posts, in
seconds (default: 0, post a single screencap and then exit)
seconds (default: 0, post a single capture and then exit)
- `SCREENCAP_BOT_COHOST_EMAIL`: the email address the bot should use to log into cohost
- `SCREENCAP_BOT_COHOST_PASSWORD`: the password the bot should use to log into cohost
- `SCREENCAP_BOT_COHOST_PAGE`: the cohost page the bot should post from
- `SCREENCAP_BOT_COHOST_DRAFT`: whether to create cohost posts as
drafts, eg for testing (default: `false`)
- `SCREENCAP_BOT_COHOST_CW`: whether to CW posts with the episode
number (default: `true` if taking screenshots, `false` if not)
- `SCREENCAP_BOT_18PLUS`: whether posts should be flagged as
containing 18+ content (default: `false`). this can be overridden
for individual shows, see below.
@ -56,6 +61,11 @@ MS IGLOO:
Gundam 0069:
path: /home/user/media/Gundam 0069
18+: true
Friends at the Table:
path: /home/user/media/Friends at the Table
custom_episodes:
prefix: "Friends at the Table: "
regex: '^\d{4}-\d{2}-\d{2} - (?<episode>.*)\.mp3$'
```
each top-level key is a show title, which will be used in spoiler
@ -75,3 +85,10 @@ warnings on posts and in image alt text. each show has two keys:
- `18+`: an optional setting for whether screencaps from this show
should be flagged as containing 18+ content. if present, this takes
precedence over the `SCREENCAP_BOT_18PLUS` environment variable.
- `custom_episodes`: Rather than letting the bot auto-detect episode
numbering, you can extract episode numbers from filenames using a regex.
+ `regex`: should match a filename, and capture the episode number
or title in a capture group named `episode`. Files that don't
match the regex will be ignored.
+ `prefix`: Will be prepended to whatever is captured by the
regex. (default: empty string)