TheFrenchGhosty / TheFrenchGhostys-Ultimate-YouTube-DL-Scripts-Collection

The ultimate collection of scripts for YouTube-DL.
GNU General Public License v3.0
2.29k stars 124 forks source link

Use `\` to split arguments to newlines. #83

Open jtagcat opened 2 years ago

jtagcat commented 2 years ago

From https://github.com/TheFrenchGhosty/TheFrenchGhostys-Ultimate-YouTube-DL-Scripts-Collection/blob/master/scripts/Archivist%20Scripts/Archivist%20Scripts/Channels/Channels.sh

It is currently quite hard to track and manage, it's on a single line. Instead, something like:

yt-dlp --format "clipped_for_demo" \
  --force-ipv4  --sleep-requests 1 --sleep-interval 5 --max-sleep-interval 30 `# avoid being rate-limited` \
  --ignore-errors \
  --no-continue \
  --no-overwrites \
  --add-metadata --parse-metadata "%(title)s:%(meta_title)s" --parse-metadata "%(uploader)s:%(meta_artist)s" \
  --write-description --write-info-json --write-annotations \
  --write-thumbnail --embed-thumbnail \
  --all-subs --embed-subs --get-comments \
  --match-filter "!is_live & !live" `# skip downloading active livestreams` \
  --output "%(uploader)s/%(uploader)s - %(upload_date)s - %(title)s/%(uploader)s - %(upload_date)s - %(title)s [%(id)s].%(ext)s" \
  --merge-output-format "mkv" \
  --datebefore "$(date --date="30 days ago" +%Y%m%d)" \
  --throttled-rate 100K `# for adult content, restart bla` \
  --batch-file "Source - Channels.txt" \
  --download-archive archive.log \
  --verbose  2>&1 | tee output.log

Would be much more readable and diffable (and documentation is right there!).

yes/no/has this been discussed before?

TheFrenchGhosty commented 2 years ago

It has been discussed, and even tried... maybe 2 years ago. I just couldn't make it work back then, and never tried again

If I do it, every argument should be on their own line, "categories" should be separated by a blank line, and there shouldn't be any comments (since Details.md is here to explain the arguments.