zenUtils/podlist.sh

14 lines
448 B
Bash
Raw Permalink Normal View History

2022-11-01 04:32:17 +00:00
#!/bin/sh
# export PODLIST_DATA_DIR=/wherever/you/want in your shell startup
# and keep a .feeds file in it where each line looks like:
# podcast_name https://domain.com/path/to/rss/feed
while read l; do
set -- ${l}
tmpfile=$(mktemp)
wget -O ${tmpfile} $2
xmllint --xpath '/rss/channel/item/enclosure/@url' ${tmpfile} | sed -e 's/url=//g' -e 's/"//g' > ${PODLIST_DATA_DIR:-~}/${1}.m3u
rm ${tmpfile}
done < ${PODLIST_DATA_DIR:-~}/.feeds