I've been getting into podcasts recently, and I've noticed that, a) a lot of clients expect you to just give them the RSS feeds that you want to subscribe to, and b) those RSS feeds aren't always easy to find.
So I kludged up a small script to query for them.
Code:
#!/usr/bin/env bash
if [[ "$1" == "" ]]; then
exit 1
fi
PODCAST=$(http "https://itunes.apple.com/search?media=podcast&term=$1" | jq -r '.results[].collectionName' | fzf --select-1 --exit-0)
if [[ "$PODCAST" == "" ]]; then
exit
fi
echo "$PODCAST"
http "https://itunes.apple.com/search?media=podcast&term=$PODCAST" | jq -r '.results[0].feedUrl'
Name it "podfeed" and call it like this:
Code:
podfeed "You Must Remember"
That currently gives you a menu of two choices:
- You Must Remember Manson
- You Must Remember This
Narrow down the list by typing, or use the arrow keys to make a selection, and press ENTER.
Then you'll see:
Code:
You Must Remember Manson
http://feeds.megaphone.fm/PPY3689373157
Note that this uses a fairly modern pipeline, specifically:
I'll decline to link to the iTunes search API documentation, as all I did was look at what CPod does:
https://github.com/z-------------/CP...ch-podcasts.js
For more ideas on what you can do with FZF, see here:
How FZF and ripgrep improved my workflow