summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKatherine Peeters <katherine.peeters@leagueh.xyz>2021-08-08 11:36:34 -0400
committerKatherine Peeters <katherine.peeters@leagueh.xyz>2021-08-08 11:36:34 -0400
commit5e081c11cc0ea69fcc5bce1696c64d38ede4849d (patch)
tree85d0a03d264e870ee0fc97f01282a3fdf5647871 /Makefile
parent0cbb63ffcca8edaf9d1d0f54cecdca6cc36e251f (diff)
downloadloh-website-5e081c11cc0ea69fcc5bce1696c64d38ede4849d.tar.gz
Added gmi2html
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index facda02..5753b5f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+GEMTEXT=$(shell find -L site -type f -name "*.gmi" -print)
MARKDOWN=$(shell find -L site -type f -name "*.md" -print)
HTML=$(MARKDOWN:%.md=%.html)
RSS=$(shell find -L . -type d -name "*.rss" -print)
@@ -30,8 +31,23 @@ all: $(HTML) $(RSS_XML)
done
cat rss_footer.xml >> $@
+%.html: %.gmi header.html footer.html gmi2html
+ @echo "GMI2HTML $@"
+ cp header.html $@
+ ./gmi2html < $< > help.txt
+ ./gmi2html < $< | sed -e 's/\.md/\.html/g ; /^<h2>.*/i </div><div class="content">' >> $@
+ echo "</div>" >> $@
+ echo "<br />" >> $@
+ lsand -H | tail -n +2 >> $@
+ cat footer.html >> $@
+
+gmi2html: gmi2html.c
+ @echo "CC $@"
+ $(CC) $(CFLAGS) $^ -o $@
+
.PHONY: clean
clean:
+ rm -f gmi2html
rm -f ${HTML}
rm -f ${RSS_XML}