From 4b7d5161a30645b0a23691687ef1aafdda62d3bb Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 25 Jul 2019 23:16:51 -0400 Subject: Use scheme to style HTMLs --- bin/Makefile | 2 +- bin/html.sh | 5 ++++- bin/style.sed | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 bin/style.sed (limited to 'bin') diff --git a/bin/Makefile b/bin/Makefile index 0e44f557..c2bd7a09 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -121,7 +121,7 @@ WEBROOT = /usr/local/www/causal.agency html: $(HTMLS) @true -$(HTMLS): ttpre hi html.sh +$(HTMLS): html.sh style.sed hi scheme ttpre .SUFFIXES: .html diff --git a/bin/html.sh b/bin/html.sh index cb7f1a66..8f4e3887 100644 --- a/bin/html.sh +++ b/bin/html.sh @@ -6,8 +6,11 @@ readonly GiteaURL='https://code.causal.agency/june/src/src/branch/master/bin' src=$1 man=${2:-} -./hi -f html -o document,tab=4 -n "${src}" /dev/null | sed '/
+	$(./scheme -s | sed -f style.sed)
+	
 	${src} in git
 EOF
 [ -f "${man}" ] && man -P cat "${PWD}/${man}" | ./ttpre
diff --git a/bin/style.sed b/bin/style.sed
new file mode 100644
index 00000000..b1fbde63
--- /dev/null
+++ b/bin/style.sed
@@ -0,0 +1,15 @@
+s/[.]bg0/html, &/
+s/[.]fg15/html, &/
+s/[.]fg12/a, &/
+s/[.]fg13/a:visited, &/
+
+s/[.]fg7/.hi.Keyword, &/
+s/[.]fg2/.hi.Macro, &/
+s/[.]fg11/.hi.Tag:focus, &/
+s/[.]fg6/.hi.String, &/
+s/[.]fg14/.hi.Format, &/
+s/[.]fg3/.hi.Interp, &/
+s/[.]fg4/.hi.Comment, &/
+s/[.]fg12/.hi.Todo, &/
+s/[.]fg1 /.hi.DiffOld, &/
+s/[.]fg2/.hi.DiffNew, &/
-- 
cgit 1.4.1