| Date: Wed, 9 Dec 2020 11:28:01 +0100
publish gopher feed
Diffstat:
M Makefile | 9 +++++++--
M templates/index.gph/footer.gph | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
--- |
| t@@ -9,10 +9,16 @@ generate:
title="$$(sed -n 's/^title.*=//p' "$${f%%.txt}.cfg" | tr a-z A-Z)"; \
out="$$(printf '%s' "$$f" | sed 's/[0-9][0-9][0-9]-//')"; \
out="$(output)$${out##pages}"; \
+ echo $$out; \
printf '# %s \n\n' "$$title" > "$$out"; \
cat "$$f" >> "$$out"; \
done
sed -i 's,|\([A-z0-9-]*\)\.html|server|port,|/\1.txt|server|port,' $(output)/index.gph
+ sed 's,https://\(A-z0-9-_\.\)/atom.xml,gopher://\1/0/atom-gopher.xml,; \
+ s,https://adamsgaard.dk,gopher://adamsgaard.dk/0,g; \
+ s,text/html,text,g; \
+ s,\.html,\.txt,g' \
+ $(output)/atom.xml > $(output)/atom-gopher.xml;
cp style.css print.css $(output)/
rsync -ra \
$(output)/ \
t@@ -41,6 +47,5 @@ deploy: generate
clean:
rm -f -r $(output)/
- rm -f $(template_blocks)
-.PHONY: default template_blocks generate view deploy
+.PHONY: default generate view deploy |