diff options
author | John Ankarström <john@ankarstrom.se> | 2020-11-29 17:27:00 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-11-29 17:27:00 +0100 |
commit | 46bf011613eda177e7ce666646417711c167de33 (patch) | |
tree | 358100f00f8541393299ce1de2f04bd0feb8fe6a /pc | |
download | pc-46bf011613eda177e7ce666646417711c167de33.tar.gz |
Add 'pc', 'pd', 'pi' and 'pl' tools
Diffstat (limited to 'pc')
-rwxr-xr-x | pc | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +#!/bin/sh + +curl -Ls "$@" | +sed -n '/<item>/,$p' | +sed -e '/^$/d' -e 's/^[ ]*//' | +awk -vFS='[<>]' ' + /<pubDate>/ { print "Date: " $3; } + /<title>/ { print "Subject: " $3; } + /<itunes:summary>/ { print "Summary: " $3; } + /<enclosure[^>]*>/ { print "Link: " $0; } + /<itunes:duration>/ { print "Duration: " $3; } + /<\/item>/ { print ""; } +' | +sed 's,<enclosure[^>]* url="\([^"]*\)".*,\1,' |