Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Latest commit

 

History

History
38 lines (22 loc) · 2.38 KB

README.md

File metadata and controls

38 lines (22 loc) · 2.38 KB

pod.sh

pod.sh is described as "a simple command line podcast aggregator". Inspired by BashPodder, it's a single file Bash script that fetches your podcast list and all new files to the specified folder.

The intended use is for it to be ran automatically by a cron-like software, or on startup. Which means, execution is unnatended. This matches my workflow: run the script every night on a VPS, which will download files to a SyncThing share synced to all my devices, where they will be listened to with the most appropiate audio (often, audiobook) player.

However, I'm easily bored. I started expanding the script: adding youtube feed support, making it more functional so that I could turn the download function into a no-op when I added new feeds whose backlog I don't need to listen to... Simple things. Eventually, something broke, and I couldn't get it to run correctly ever again. Which prompted me to rewrite it, in a different language I could learn from scratch. Hence...

pod.rs

Dependencies not fetched by cargo

  • openssl 1.1 (build)
  • ffmpeg (runtime)

Required (plain text) files

  • The list file

    This is where you specify how the program will run. The first line must consist of a path where podcast files will be downloaded to, and the default tempo, separated by whitespace. The rest of the lines can be your subscriptions, with a name and a specific tempo. Note I wrote some weird stuff so that, even if the parameters are whitespace separated, escaping spaces in the podcast name isn't needed. Example:

    ~/podcasts		1.17
    Linux Action News		http://linuxactionnews.com/rss
    New Rustacean		1	http://www.newrustacean.com/feed.xml
    
  • The db file

    A simple list of URLs to podcast files. Each time an episode is downloaded, its URL will be appended to this file so that the program knows on next run that it has already been downloaded. I specifically made the decision not to create this file, and instead exit if it's not found, so that I don't end up accidentally downloading 7000 files because of a typo. An empty file is fine, as is the poddb generated by the original pod.sh. It's not neccessary to interact with this file any further after touching it for first run

Running pod.rs

pod.rs path/to/list path/to/poddb

For example:

pod.rs ~/Sync/pod.rs/{list,poddb}