summaryrefslogtreecommitdiff
path: root/pc
diff options
context:
space:
mode:
Diffstat (limited to 'pc')
-rwxr-xr-xpc14
1 files changed, 14 insertions, 0 deletions
diff --git a/pc b/pc
new file mode 100755
index 0000000..a891740
--- /dev/null
+++ b/pc
@@ -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,'