summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorCase Duckworth2022-08-19 16:12:35 -0500
committerCase Duckworth2022-08-19 16:12:35 -0500
commit30d0cdf4059439786699b77cf0d406947f727894 (patch)
tree68148b17dd974ca62dd2bd8525a2e06b65497c00 /Makefile
parentInitialize (diff)
downloadfwendplanet-30d0cdf4059439786699b77cf0d406947f727894.tar.gz
fwendplanet-30d0cdf4059439786699b77cf0d406947f727894.zip
Paginate
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/Makefile b/Makefile index 1fa687a..28c668e 100644 --- a/Makefile +++ b/Makefile
@@ -3,19 +3,29 @@ REPO = https://tildegit.org/casa/pages/raw/branch/main/opml/mug.of.opml
3OUTD = /var/www/acdw.casa/fwends/ 3OUTD = /var/www/acdw.casa/fwends/
4RC = sfeedrc 4RC = sfeedrc
5FEEDS = feeds 5FEEDS = feeds
6FILES = index.html style.css 6FILES = index.html style.css p*.html
7AGGREGATOR = ./fwendplanet.sh 7AGGREGATOR = ./fwendplanet.sh
8MAXAGE = 60 8PAGEN = 60 # 2 months
9 9
10.PHONY: publish 10.PHONY: publish
11publish: build 11publish: build
12 mkdir -p $(OUTD) 12 mkdir -p $(OUTD)
13 cp $(FILES) $(OUTD) 13 rsync -avz --delete $(FILES) $(OUTD)
14 14
15.PHONY: build 15.PHONY: build
16build: $(RC) 16build: $(RC)
17 sfeed_update $(RC) || true 17 -rm p*.html
18 $(AGGREGATOR) $(FEEDS) $(MAXAGE) >index.html 18 #-sfeed_update $(RC)
19 NEXT=p2.html PREV=0 $(AGGREGATOR) $(FEEDS) 1 $(PAGEN) >index.html
20 NEXT=p3.html PREV=index.html $(AGGREGATOR) $(FEEDS) 2 $(PAGEN) >pn.html
21 N=2; while grep '<details>' pn.html >/dev/null 2>&1; do \
22 mv pn.html p$$N.html; \
23 N=$$((N+1)); \
24 NEXT=p$$((N+1)).html PREV=p$$((N-1)).html\
25 $(AGGREGATOR) $(FEEDS) $$N $(PAGEN) >pn.html; \
26 done; \
27 rm pn.html; \
28 NEXT=0 PREV=p$$((N-2)).html $(AGGREGATOR) $(FEEDS) $$((N-1)) $(PAGEN) >p$$((N-1)).html
19 29
20$(RC): 30$(RC):
21 curl -L $(REPO) | sfeed_opml_import > $@ 31 curl -L $(REPO) | sfeed_opml_import > $@