blob: 390d931e2d1ad5f7b106ffad47c74c4052e98c17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
URL = https://acdw.casa/fwends
REPO = https://tildegit.org/casa/pages/raw/branch/main/opml/mug.of.opml
OUTD = /var/www/acdw.casa/fwends/
RC = sfeedrc
FEEDS = feeds
FILES = *.html *.css *.js
AGGREGATOR = ./fwendplanet.sh
PAGEN = 60 # 2 months
.PHONY: publish
publish: build
mkdir -p $(OUTD)
rsync -avz --delete $(FILES) $(OUTD)
.PHONY: build
build: $(RC)
-rm p*.html
-sfeed_update $(RC)
NEXT=p2.html PREV=0 $(AGGREGATOR) $(FEEDS) 1 $(PAGEN) >index.html
NEXT=p3.html PREV=index.html $(AGGREGATOR) $(FEEDS) 2 $(PAGEN) >pn.html
N=2; while grep '<details>' pn.html >/dev/null 2>&1; do \
mv pn.html p$$N.html; \
N=$$((N+1)); \
NEXT=p$$((N+1)).html PREV=p$$((N-1)).html\
$(AGGREGATOR) $(FEEDS) $$N $(PAGEN) >pn.html; \
done; \
rm pn.html; \
NEXT=0 PREV=p$$((N-2)).html $(AGGREGATOR) $(FEEDS) $$((N-1)) $(PAGEN) >p$$((N-1)).html
$(RC):
curl -L $(REPO) | sfeed_opml_import > $@
echo sfeedpath=$(FEEDS) >> $@
|