diff options
author | John Ankarström <john@ankarstrom.se> | 2020-12-05 20:22:20 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-12-05 20:22:20 +0100 |
commit | 6f2f2a0a36366705104488b17912a0eb2f3b56de (patch) | |
tree | cbe0bf65e338ba45434b24bfeadcabaf45a047a8 | |
parent | 90c33132ef723fec5f1ee29e740501df8606c5b6 (diff) | |
download | pc-6f2f2a0a36366705104488b17912a0eb2f3b56de.tar.gz |
-rwxr-xr-x | pc | 2 | ||||
-rwxr-xr-x | pl | 13 |
2 files changed, 13 insertions, 2 deletions
@@ -4,7 +4,7 @@ curl -Ls "$@" | sed -n '/<item>/,$p' | -sed -e '/^$/d' -e 's/^[ ]*//' | +sed '/^$/d; s/^[ ]*//' | awk -vFS='[<>]' -vOFS=' ' ' /<pubDate>/ { date = $3 } /<itunes:duration>/ { duration = $3 } @@ -12,4 +12,15 @@ storm=https://rss.acast.com/stormensutveckling ts=https://rss.art19.com/thinkspot-presents unb=https://unbelievable.podbean.com/feed.xml -eval echo \$$1 +# Write all +if test "$1" = -a +then eval echo $(grep '^[a-z]*=' "$0" | sed 's/=.*//; s/^/$/') | tr ' ' ' +'; exit +fi + +# Optional interactive selection +if test -z "$1" +then eval echo $(grep '^[a-z]*=' "$0" | ep | sed 's/=.*//; s/^/$/') | tr ' ' ' +' +else eval echo \$$1 +fi |