Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General > Member Success Stories
User Name
Password Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.


  Search this Thread
Old 06-24-2019, 09:46 PM   #1
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,959

Rep: Reputation: 3848Reputation: 3848Reputation: 3848Reputation: 3848Reputation: 3848Reputation: 3848Reputation: 3848Reputation: 3848Reputation: 3848Reputation: 3848Reputation: 3848
CLI app to get podcast feed URLs

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.

#!/usr/bin/env bash

if [[ "$1" == "" ]]; then
  exit 1

PODCAST=$(http "$1" | jq -r '.results[].collectionName' | fzf --select-1 --exit-0)

if [[ "$PODCAST" == "" ]]; then

echo "$PODCAST"
http "$PODCAST" | jq -r '.results[0].feedUrl'
Name it "podfeed" and call it like this:

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:

You Must Remember Manson
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:

For more ideas on what you can do with FZF, see here:

How FZF and ripgrep improved my workflow
Old 06-25-2019, 07:50 AM   #2
Registered: Jul 2018
Posts: 212

Rep: Reputation: 155Reputation: 155
That's pretty neat, Dugan. My only question is whether it would be better to store the result of the first search in a variable, that way you don't need to call the same URL again?
Something like this?
#!/usr/bin/env bash

feedNames="$(<<<"$data" jq '.results[].collectionName')"
<<<"$data" jq -r ".results[] | select(.collectionName == $(fzy <<< "$feedNames")) | .feedUrl"
EDIT: By the way, I use fzy, but it works just the same with fzf.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Cli.Fyi A Tool To Quickly Retrieve Information About eMails, IP Addresses, URLs And Lots More From The CLI Or Browser LXer Syndicated Linux News 0 03-15-2018 03:03 PM
Exporting Amarok podcast URLs LinuxD Linux - Desktop 2 12-07-2009 01:21 AM
Democracy-player? Alternative internet-TV/vidblog/video-podcast feed aggregators? silencestone Slackware 4 12-16-2007 06:55 PM
Looking for RSS & Atom Feed (News Feed)? suse2166 Linux - Software 2 11-16-2006 04:58 PM
how to check urls and stop internet urls in network gface Linux - Networking 5 03-24-2005 09:48 PM > Forums > Linux Forums > Linux - General > Member Success Stories

All times are GMT -5. The time now is 03:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration