diff options
author | John Ankarström <john@ankarstrom.se> | 2020-12-03 04:23:42 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-12-03 04:26:47 +0100 |
commit | 7389fdf0e7944027c89f81fe3c2b961cafb7f99c (patch) | |
tree | 7aace06d6f2eaf838c9362495723b1a93a04ccdf /pd | |
parent | d489e722120ee3db6c2d72591ab8e1958f744fa8 (diff) | |
download | pc-7389fdf0e7944027c89f81fe3c2b961cafb7f99c.tar.gz |
pd: Name downloaded file after episode title
Diffstat (limited to 'pd')
-rwxr-xr-x | pd | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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)" |