48 lines
846 B
Bash
Executable File
48 lines
846 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# AGPLv3
|
|
|
|
test -n "$ytfeed_feeds_dir" || ytfeed_feeds_dir=feeds/
|
|
export ytfeed_feeds_dir
|
|
|
|
printf "\
|
|
____ __ __ __
|
|
/_/ / /_ /_/ /_/ _/ /\\ ytfeed 2.0.0-pre
|
|
__/ / / /_ /_ /_/ /__\\ dtb 2020-2025
|
|
"
|
|
|
|
../menu <<EOF
|
|
|
|
Subscribe to new feed.
|
|
|
|
printf 'Please enter the channel ID to which to be subscribed: '
|
|
</dev/tty \
|
|
head -n 1 \
|
|
| xargs ytfeed.dl "$ytfeed_feeds_dir"
|
|
|
|
Browse feeds.
|
|
|
|
ytfeed.browse-feeds "$ytfeed_feeds_dir" \
|
|
| ../menu
|
|
|
|
Browse all feeds.
|
|
|
|
cat "$ytfeed_feeds_dir"/*.xml \
|
|
| ytfeed.aggregate \
|
|
| ytfeed.browse-feed \
|
|
| ../menu
|
|
|
|
Refresh feeds.
|
|
|
|
for f in "$ytfeed_feeds_dir"/*.xml
|
|
do printf '%s\\n' "\$f" \
|
|
| sed -e 's,^.*/,,' \
|
|
-e 's,\\.xml\$,,' \
|
|
| xargs ytfeed.dl "$ytfeed_feeds_dir"
|
|
done
|
|
|
|
Show configuration
|
|
|
|
printf 'ytfeed_feeds_dir: %s\n' "$ytfeed_feeds_dir" >&2
|
|
EOF
|