diff options
author | John Ankarström <john@ankarstrom.se> | 2020-12-03 15:47:31 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-12-03 15:47:31 +0100 |
commit | 091b91811202902dce64666c29fdc2a77bc2c7d9 (patch) | |
tree | 8b651ed0e9822232f813156444b7c237ae89c73e /pd | |
parent | b62fc8acc683aaaa7ae24552ed5b5129378318ad (diff) | |
download | pc-091b91811202902dce64666c29fdc2a77bc2c7d9.tar.gz |
Rename File to Link, move filename generation from pd to pc
Diffstat (limited to 'pd')
-rwxr-xr-x | pd | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -2,13 +2,10 @@ # pd -- download podcast episode(s) -u= -test "$1" = -u && u=1 # unix mode - -eval curl -ZL "$(sed -n 's/^Title: \|File: //p' | +eval curl -ZL "$(sed -n 's/^Link: \|File: //p' | sed 's/ / /g; s/\\/\\\\/g; '"s/'/'\"'\"'/g" | paste - - | -while IFS=' ' read title file; do - test -z "$u" && title=`printf '%s\n' "$title" | sed 's/\\\\/./g; s,[/:*<>|],.,g; s/?//g; '"s/\"/'\"'\"'/g"` # dos/windows (default) - printf "-o '%s' '%s' " "$title.${file##*.}" "$file" +while IFS=' ' read link file; do + file=`printf '%s\n' "$file" | sed "s/\"/'\"'\"'/g"` + printf "-o '%s' '%s' " "$file" "$link" done)" |