rsrsss/Makefile

30 lines
1.2 KiB
Makefile
Raw Normal View History

2023-07-22 15:37:49 +00:00
.PHONY: all
all: css/sprites.css opml/feeds.opml opml/nhc.opml opml/cta.opml
2023-07-22 15:37:49 +00:00
USER_AGENT:="RSRSSS/1.0 (+https://envs.net/~lucidiot/rsrsss/feed.xml)"
XIDEL_ARGS:=--silent --user-agent=$(USER_AGENT) --wait=1
2023-10-13 08:17:31 +00:00
opml/feeds.opml: feed.xml xquery/feeds_opml.xqy
xidel $(XIDEL_ARGS) feed.xml --extract-kind=xquery3 --extract-file=xquery/feeds_opml.xqy --output-format=xml > $@
2023-09-03 21:23:20 +00:00
chmod a+r $@
2023-07-22 15:37:49 +00:00
# The page is encoded as latin1 but xidel does not convert it by itself when making an HTTP request, so we use curl
opml/nhc.opml: xquery/nhc_opml.xqy
curl --silent --fail -H User-Agent:$(USER_AGENT) https://www.nhc.noaa.gov/aboutrss.shtml |\
xidel $(XIDEL_ARGS) - --stdin-encoding=iso-8859-1 --extract-kind=xquery3 --extract-file=xquery/nhc_opml.xqy --output-format=xml > $@
2023-09-05 12:48:17 +00:00
chmod a+r $@
opml/cta.opml: xquery/cta_opml.xqy
xidel $(XIDEL_ARGS) --extract-kind=xquery3 --extract-file=xquery/cta_opml.xqy --output-format=xml > $@
chmod a+r $@
2023-07-22 15:37:49 +00:00
sprites := $(wildcard img/sprites/*.png)
img/sprites.png: $(sprites)
2023-09-03 21:23:20 +00:00
convert $(sprites) +append $@
chmod a+r $@
2023-07-22 15:37:49 +00:00
2023-10-13 08:17:31 +00:00
css/sprites.css: img/sprites.png xquery/build_sprites_css.xqy
xidel $(XIDEL_ARGS) --extract-kind=xquery3 --extract-file=xquery/build_sprites_css.xqy > $@
2023-09-03 21:23:20 +00:00
chmod a+r $@