Parallel sync
This commit is contained in:
parent
13dc837a52
commit
143fa6383e
8
podcast
8
podcast
@ -3,10 +3,10 @@
|
|||||||
cd "$(dirname "$(realpath "$0")")"
|
cd "$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
if [ "$1" == "sync" ]; then
|
if [ "$1" == "sync" ]; then
|
||||||
cat "urls"| while read url; do
|
cat urls | xargs -d '\n' curl -Z $(seq 1 $(wc -l <urls) | xargs -I{} echo -o .tmp.{}.rss-file)
|
||||||
curl -s -o .tmp.rss-file "$url"
|
for file in .tmp.*.rss-file; do
|
||||||
name="$(cat .tmp.rss-file | xq -r '.rss.channel.title')"
|
name="$(cat "$file" | xq -r '.rss.channel.title')"
|
||||||
mv .tmp.rss-file "${name}.rss"
|
mv "$file" "${name}.rss"
|
||||||
echo "Updated \"$name\""
|
echo "Updated \"$name\""
|
||||||
done
|
done
|
||||||
elif [ "$1" == "play" ]; then
|
elif [ "$1" == "play" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user