diff options
Diffstat (limited to 'update_html')
-rwxr-xr-x | update_html | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/update_html b/update_html index b9a7ad79..08e9a3f4 100755 --- a/update_html +++ b/update_html @@ -1,16 +1,24 @@ -#!/bin/bash +#!/usr/bin/zsh # Regenerate html files. -for f in *.cc *.mu +rm html/**/*.html + +process() { + vim -c "TOhtml | w | qa" $1 + + sed -i 's,<title>\~/mu/,<title>Mu - ,' $1.html + sed -i 's,\.html</title>,</title>,' $1.html + sed -i 's/^\*.*/* { font-size: 1.05em; }/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: #a04060; }/' $1.html # not meant to be read/ can be lower-contrast + + mv -i $1.html html/`dirname $1` +} + +for f in *.cc *.mu edit/*.mu do - vim -c "TOhtml | w | qa" $f - mv $f.html html + process $f done -sed -i 's,<title>\~/mu/,<title>Mu - ,' html/*.html -sed -i 's,\.html</title>,</title>,' html/*.html -sed -i 's/^\*.*/* { font-size: 1.05em; }/g' html/*.html -# tweak contrast -sed -i 's/^\.Constant .*/.Constant { color: #00a0a0; }/' html/*.html -sed -i 's/^\.muControl .*/.muControl { color: #c0a020; }/' html/*.html -sed -i 's/^\.Comment .*/.Comment { color: #9090ff; }/' html/*.html -sed -i 's/^\.Delimiter .*/.Delimiter { color: #a04060; }/' html/*.html # not meant to be read/ can be lower-contrast |