Archived
1
0
Fork 0
This repository has been archived on 2025-06-04. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
2024-06-26 10:17:42 +09:00
route fix logging 2024-06-26 10:17:42 +09:00
.gitignore Initial Commit 2024-06-19 13:45:28 +09:00
clear_cache.py Initial Commit 2024-06-19 13:45:28 +09:00
main.py Initial Commit 2024-06-19 13:45:28 +09:00
README.md Initial Commit 2024-06-19 13:45:28 +09:00
sync.json Initial Commit 2024-06-19 13:45:28 +09:00

trowel

YT-archive sync tool for Linux

Install

  1. Install yt-dlp and jq
  2. make sure yt-dlp and jq is accessible by $PATH
  3. edit sync.json to configure which channel or playlists to download
  4. (optional) automate this script via cron

sync.json

there are sample configuration contained on sync.json.

sample and explanation

{
  "name": "config name",
  "path": "path to archive ans sync",
  "target_url": "https://www.youtube.com/@channel_name/videos",
  "last_checked": 0,
  "default_format": "bv+ba",
  "downloaded": []
}
  • path : UNIX absolute path that where to archive and sync videos.
  • target_url : YouTube target URL to archive and sync.
    • this can be channel(videos or shorts or both) or playlist URL.
  • last_checked : epoch time that where this config synced. this changes every time you runs main.py.
  • default_format : format definition that can read by yt-dlp.
    • bv+ba downloads best definition that available in video. this can be up to 8K60.
    • for example, If you want to archive and sync videos up to 1080p60, set it to bv[height<=1080]+ba.
  • downloaded : skip list that changes every time you runs main.py, indicating that these videos are already downloaded.
    • If you wanna clear this sections, run clear_cache.py.