summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bin/Makefile2
-rw-r--r--bin/html.sh5
-rw-r--r--bin/style.sed15
3 files changed, 20 insertions, 2 deletions
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 '/<pre/d'
+./hi -f html -o document,tab=4 -n "${src}" /dev/null | sed -e '/<pre/d'
 cat <<- EOF
+	<style>
+	$(./scheme -s | sed -f style.sed)
+	</style>
 	<code><a href="${GiteaURL}/${src}">${src} in git</a></code>
 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, &/