Created OUTPUT_TEMPLATE Cookbook (markdown)

Alex
2025-04-11 18:18:06 +03:00
parent 1ca44a4092
commit b5ae38d5ee

@@ -0,0 +1,14 @@
Here you can find various useful configurations that can be set via the `OUTPUT_TEMPLATE` environment variable.
### Playlist details, author, UNIX filename sanitization
Set the output filename to the following:
- playlist name and author, if present
- playlist number and count, if present (zero-padded, if needed)
- video author, title and release date in YYYY-MM-DD format, falling back to *UNKNOWN_...* if missing
- sanitises everything for valid UNIX filename
```yaml
environment:
- 'OUTPUT_TEMPLATE=%(playlist_title&Playlist |)S%(playlist_title|)S%(playlist_uploader& by |)S%(playlist_uploader|)S%(playlist_autonumber& - |)S%(playlist_autonumber|)S%(playlist_count& of |)S%(playlist_count|)S%(playlist_autonumber& - |)S%(uploader,creator|UNKNOWN_AUTHOR)S - %(title|UNKNOWN_TITLE)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d|UNKNOWN_DATE)S.%(ext)s'
```