|
@@ -1,4 +1,4 @@
|
|
|
-#!/bin/sh
|
|
|
+#!/usr/bin/env bash
|
|
|
|
|
|
POD_BASE_DIR=${POD_BASE_DIR:-~/Music/}
|
|
|
POD_SUB_DIR=${POD_SUB_DIR:-Podcasts}
|
|
@@ -146,9 +146,15 @@ case "$CMD" in
|
|
|
CUR_DIR=$(pwd)
|
|
|
cd $POD_BASE_DIR
|
|
|
grep -v '^# ' ${POD_SUB_DIR}/podcasts-list.txt |\
|
|
|
- cut -f2 |\
|
|
|
- xargs -L1 git annex importfeed \
|
|
|
- --template="${POD_SUB_DIR}/\${feedtitle}/\${itempubdate}-\${itemtitle}\${extension}"
|
|
|
+ while read -r LINE; do
|
|
|
+ URL=${LINE##* }
|
|
|
+ TITLE=${LINE% *}
|
|
|
+ echo "Downloading ${TITLE}..."
|
|
|
+ git annex importfeed \
|
|
|
+ --template="${POD_SUB_DIR}/\${feedtitle}/\${itempubdate}-\${itemtitle}\${extension}" \
|
|
|
+ "${URL}"
|
|
|
+ echo
|
|
|
+ done
|
|
|
git annex add ${POD_SUB_DIR}
|
|
|
git commit -m "Caught podcasts"
|
|
|
git annex find --include='Podcasts/*' --and --not --metadata tag=listened |\
|