podcast_downloader: read RSS feeds and get podcast episodes
This AWK program reads from standard input or from one or more files. This input specifies the settings and the URLs of the RSS feeds to read. After reading the RSS feeds and getting episodes, the program writes the updated information to standard output. If you redirect the output to a file, you can use it for future input.
The program can use
curl
or
wget
to download files.
Download
Download a compressed archive file:
Unpack
Unpack the archive file. For example:
-
To unpack
podcast_downloader.tar.lz: tar -xf podcast_downloader.tar.lz -
To unpack
podcast_downloader.tar.gz: tar -xf podcast_downloader.tar.gz -
To unpack
podcast_downloader.zip: unzip -q podcast_downloader.zip
Example
Suppose that:
-
The file
podcast_downloader.awkcontains the AWK program. -
The file
podcasts.txtcontains the podcast information.
To:
-
Run the program and write the updated podcast information to the file
podcasts.txt.new. - If the program ends successfully, replace the original podcast information file with the new podcast information file.
awk -f podcast_downloader.awk -- podcasts.txt > podcasts.txt.new && mv podcasts.txt.new podcasts.txt
The compressed archives contain a shell script that does something similar.