commit 47fc5c240bcc3cfc46a19fbc63c703a5d24a8b7b
parent dd64f92875f51862c8d7a03c318f0cdd0937b0c7
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Wed, 9 Dec 2020 11:28:01 +0100
publish gopher feed
Diffstat:
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -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)/ \
@@ -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
diff --git a/templates/index.gph/footer.gph b/templates/index.gph/footer.gph
@@ -1,2 +1,2 @@
-[0|Atom feed|/atom.xml|server|port]
+[0|Atom feed|/atom-gopher.xml|server|port]