#!/usr/bin/env zsh # Regenerate html files. rm html/**/*.html process() { vim -c TOhtml -c write -c qall $1 sed -i 's,\~/mu/,<title>Mu - ,' $1.html sed -i 's,\.html,,' $1.html sed -i 's/^\* { \(.*\) }/* { font-size: 12pt; \1 }/g' $1.html sed -i 's/^body { \(.*\) }/body { font-size: 12pt; \1 }/g' $1.html # tweak contrast sed -i 's/^\.Constant .*/.Constant { color: #00a0a0; }/' $1.html sed -i 's/^\.muControl .*/.muControl { color: #c0a020; }/' $1.html sed -i 's/^\.Comment .*/.Comment { color: #9090ff; }/' $1.html sed -i 's/^\.Delimiter .*/.Delimiter { color: #800080; }/' $1.html # not meant to be read; can be lower-contrast sed -i 's/^\.PreProc .*/.PreProc { color: #800080; }/' $1.html # not meant to be read; can be lower-contrast sed -i 's/^\.Identifier .*/.Identifier { color: #fcb165; }/' $1.html sed -i 's/^\.Special .*/.Special { color: #c00000; }/' $1.html # same as traceAbsent.. mv -i $1.html html/`dirname $1` } for f in *.cc *.mu edit/*.mu do process $f done