youtube-to-opml/Makefile

20 lines
608 B
Makefile
Raw Normal View History

JAQ?=jaq
subscriptions.txt: subscriptions.json
$(JAQ) --raw-output '.[]' subscriptions.json > $@
subscriptions.curl: subscriptions.json
2024-05-06 02:38:41 +00:00
$(JAQ) --raw-output '.[] | (split("/") | last) as $$name | "url \(.)\noutput \($$name).html"' subscriptions.json > $@
fetch: subscriptions.curl
curl --location --output-dir html --create-dirs --rate 1/s --config subscriptions.curl
channel-json: subscriptions.txt
2024-11-08 17:42:40 +00:00
cat subscriptions.txt | xargs -n1 --verbose ./generate-json-opml
# turn all the channel json files into an OPML file
subscriptions.opml:
./generate-opml > $@
.PHONY: channel-json subscriptions.opml