about summary refs log tree commit diff stats
path: root/update_html
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-12-07 16:19:38 -0800
committerKartik Agaram <vc@akkartik.com>2019-12-07 18:06:17 -0800
commit9e45cae061fd345d3270f236769bd94966a42eb2 (patch)
tree5459e3e692e039f0ce1663a60af99d6053ccbc0e /update_html
parent25636f70d0f116ef2f842e9ca25dfb781071cd2d (diff)
downloadmu-9e45cae061fd345d3270f236769bd94966a42eb2.tar.gz
5799 - move html-generation to `tools/` directory
Diffstat (limited to 'update_html')
-rwxr-xr-xupdate_html74
1 files changed, 0 insertions, 74 deletions
diff --git a/update_html b/update_html
deleted file mode 100755
index 2c07b476..00000000
--- a/update_html
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/bash
-# Regenerate html files.
-# If given a single argument, regenerate just that file.
-
-set -e
-
-( cd linkify; build; )
-
-# generate html/$1.html using /tmp/tags
-process() {
-  rm -f html/$1.html
-  convert_html $1
-  linkify/linkify /tmp/tags html/$1.html
-  mv html/$1.html.out html/$1.html
-}
-
-URL_BASE='https://github.com/akkartik/mu/blob/master'
-
-convert_html() {
-  vim -c "set number" -c TOhtml -c write -c qall $1
-
-  sed -i 's,<title>.*/mu/,<title>Mu - ,' $1.html
-  sed -i 's,\.html</title>,</title>,' $1.html
-
-  sed -i "/^<body/a <a href='$URL_BASE/$1'>$URL_BASE/$1</a>" $1.html
-
-  sed -i 's/^\* { \(.*\) }/* { font-size:12pt; \1 }/g' $1.html
-  sed -i 's/^body { \(.*\) }/body { font-size:12pt; \1 }/g' $1.html
-
-  sed -i '/^body {/a a { color:inherit; }' $1.html
-
-  # switch unicode characters around in the rendered html
-  #   the ones we have in the source files render double-wide in html
-  #   the ones we want in the html cause iTerm2 to slow down in alt-tabbing for some reason
-  # the following commands give us the best of both worlds
-  sed -i -e 's/┈/╌/g' -e 's/┊/╎/g' $1.html
-
-  mv -i $1.html html/`dirname $1`
-}
-
-ctags -x *.cc  |grep -v '^. '  > /tmp/tags  # don't hyperlink every 'i' to the integer register variant
-for f in *.cc
-do
-  test $# -gt 0  &&  test $1 != $f  &&  continue
-  process $f
-done
-
-for f in examples/*.subx
-do
-  test $# -gt 0  &&  test $1 != $f  &&  continue
-  ( cd examples
-    ctags -x `basename $f` > /tmp/tags
-  )
-  process $f
-done
-
-ctags -x *.subx  > /tmp/tags
-for f in *.subx
-do
-  test $# -gt 0  &&  test $1 != $f  &&  continue
-  process $f
-done
-
-for f in apps/*.subx
-do
-  test $# -gt 0  &&  test $1 != $f  &&  continue
-  ( cd apps
-    ctags -x ../*.subx `basename $f` > /tmp/tags
-  )
-  process $f
-done
-
-rm /tmp/tags
-( cd linkify; clean; )