Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@johnelliott
Last active April 15, 2020 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnelliott/c1cd2f37d4a9de8b58a50d6f04e53d4e to your computer and use it in GitHub Desktop.
Save johnelliott/c1cd2f37d4a9de8b58a50d6f04e53d4e to your computer and use it in GitHub Desktop.

Tips for using PCD: https://github.com/kvannotten/pcd

... I also wanted [range downloads], but then I first used the seq and parallel programs. It's a very unix-y solution, but it turns out ids being integers is great. You may need to install and play with seq and parallel a bit, but this works for me:

episode downloads (echo must be removed for real downloading):

$ seq 4 10 |parallel echo pcd download mypodcast {}
pcd download mypodcast 4
pcd download mypodcast 5
pcd download mypodcast 6
pcd download mypodcast 7
pcd download mypodcast 8
pcd download mypodcast 9
pcd download mypodcast 10

Combined with cron and a Mac automator action that displays a notification when files in my podcast dir change, I feel like I have a complete system that works for me.

cron example to download from podcasts 1-7 in the evenings

# podcasts
10 18-23 * * * cd /Users/john/Podcasts && /Users/john/go/bin/pcd sync >/dev/null 2>&1 && pcd sync && seq 7 | parallel /Users/john/go/bin/pcd download {} >/dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment