about summary refs log blame commit diff stats
path: root/update_html
blob: 08e9a3f4113805ddccb6129d6b1c2e9847ab87f5 (plain) (tree)
1
2
3
              

                        

















                                                                                                                   
  
            
    
#!/usr/bin/zsh
# Regenerate html files.

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
  process $f
done