YouTube OPML subscription archiver
Find a file
Viktor Varland 97a299fe0b
All checks were successful
build / build (push) Successful in 1m53s
feat: support CONFIG env variable for file
2025-03-29 09:48:23 +01:00
.forgejo/workflows ci: master => main 2025-03-28 15:44:26 +01:00
internal feat: control use of cookies_file 2025-03-29 08:55:38 +01:00
.gitignore feat: add more config options 2025-03-28 12:44:38 +01:00
Containerfile feat: support CONFIG env variable for file 2025-03-29 09:48:23 +01:00
go.mod feat: youtube channel archiver 2025-03-27 15:54:31 +01:00
go.sum feat: youtube channel archiver 2025-03-27 15:54:31 +01:00
main.go feat: support CONFIG env variable for file 2025-03-29 09:48:23 +01:00
README.md feat: support CONFIG env variable for file 2025-03-29 09:48:23 +01:00
shell.nix feat: youtube channel archiver 2025-03-27 15:54:31 +01:00

subsyt

config

config.toml:

dry_run = true                          # set to `false` for real run
out_dir = "./vids"                      # path to archive vids

[provider]
[provider.youtube]
cmd = "./yt-dlp"                        # path to yt-dlp binary
url = "https://www.youtube.com"         # full yt url
throttle = 1                            # throttle yt request
range = "1:5:1"                         # [START][:STOP][:STEP]
after_date = "20250326"                 # not in use
cookies = false                         # control use of cookies file
cookies_file = "./cookies.txt"          # pass user cookies to yt
opml_file = "./opml.xml"                # the opml file to use

subs-opml.xml:

<?xml version="1.0"?>
<opml version="1.1">
    <body>
        <outline ...>
            <outline .../>
            <outline .../>
            <outline .../>
        </outline>
        <outline ...>
            <outline .../>
            <outline .../>
            <outline .../>
        </outline>
    </body>
</opml>

Cookies

E.g. from Chromium:

yt-dlp --cookies-from-browser chromium --cookies cookies.txt

Container

podman run --rm \
    --env='CONFIG=/data/config.toml' \
    --volume=path/to/config:/data/config.toml \
    --volume=path/to/opml:/data/opml.xml \
    --volume=path/to/cookies:/data/cookies.txt
    registry.meatbag.se/varl/subsyt

Result

vids
└── 2 Much ColinFurze
    ├── 2025
    │   └── 20250327-Secret_Garage_Update_15_Questions_answered_and_Roofs_Covered-XN4HiUMuQdo.webm
    └── archive.txt