wip - download rss

This commit is contained in:
Balakrishnan Balasubramanian 2022-08-03 17:22:30 -04:00
parent a0c798343e
commit 2bb8fa675a

31
down.sh Executable file
View File

@ -0,0 +1,31 @@
#!/usr/bin/bash
#Dependencies:
# yq
# curl
echo "Running from: $PWD"
yqf()
{
~/bin/yq "$1" config.yaml
}
export ALL_PROXY="socks5h://127.0.0.1:9050"
entries=".entries"
for id in $(yqf "$entries | keys | .[]")
do
entry="${entries}.$id"
name=$(yqf "${entry}.name")
url=$(yqf "${entry}.url")
limit=$(yqf "${entry}.limit")
echo "============================ start ============================"
curl -L -o "cache/${name}.rss" "$url"
# download "$name" "${name}.rss" &
echo "$name"
echo "$url"
echo "$limit"
echo "============================ done ============================"
done