summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpd7
1 files changed, 6 insertions, 1 deletions
diff --git a/pd b/pd
index 7bcaead..b76f1d0 100755
--- a/pd
+++ b/pd
@@ -2,4 +2,9 @@
# pd -- download podcast episode(s)
-curl -Z `sed -n 's/Link: /-OJL /p'`
+eval curl -ZL "$(sed -n 's/^Title: \|File: //p' |
+sed 's/ / /g; s/\\/\\\\/g; '"s/'/\\\\'/g" |
+paste - - |
+while IFS=' ' read title file; do
+ printf "-o '%s' '%s' " "$title.${file##*.}" "$file"
+done)"