summary refs log tree commit diff stats
path: root/.frontmatter/database/mediaDb.json
Commit message (Collapse)AuthorAgeFilesLines
* Add new Fediverse postmounderfod2023-07-131-0/+1
tik.com> 2016-12-27 11:14:12 -0800 committer Kartik K. Agaram <vc@akkartik.com> 2016-12-27 11:14:12 -0800 3720' href='/akkartik/mu/commit/update_html?h=hlt&id=76a56bc9123e5372a008bc64c3da72f45d09c4d3'>76a56bc9 ^
f5465e12 ^
e5c11a51 ^
f5465e12 ^


e6056999 ^

4c4d325c ^



f5465e12 ^



e6056999 ^

70f4e9b6 ^
c0e9154d ^
f5465e12 ^
ccae4585 ^





f5465e12 ^


f40b079c ^










f5465e12 ^
4bbd3ded ^
f5465e12 ^
4bbd3ded ^
201458e3 ^





97eb971b ^








fdfe34de ^
97eb971b ^
fdfe34de ^


201458e3 ^





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
           

                        

      
           
                                                   


                                                

                                                                    



                                                                              



                                                                    

                                                                                                                   
                                                                                           
                                                                                         
 





                                                                                           


                                 










                               
                            
  
            
    





                                                                        








                                             
           
                                         


                                                     





                                       
#!/bin/bash
# Regenerate html files.

set -e

process() {
  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 's/^\* { \(.*\) }/* { font-size: 12pt; \1 }/g' $1.html
  sed -i 's/^body { \(.*\) }/body { font-size: 12pt; \1 }/g' $1.html
  sed -i 's/^\.LineNr .*/.LineNr { color: #444444; }/' $1.html  # line numbers
  # make links less salient since we may have a lot of cross-links
  sed -i '/^body {/ a  a:hover { text-decoration: underline; }' $1.html
  sed -i '/^body {/ a  a { text-decoration: none; }' $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: #c0a020; }/' $1.html  # same as muControl
  sed -i 's/^\.Special .*/.Special { color: #c00000; }/' $1.html  # same as traceAbsent..

  # 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`
}

if [ $# -gt 0 ]
then
  for f in $*
  do
    process $f
  done
  exit 0
fi

rm html/*.html html/edit/*.html

for f in *.cc *.mu edit/*.mu
do
  process $f
done

if which ctags >&/dev/null
then
  ( cd linkify; build; )
  ctags -x *.cc  |grep -v "^operator \| member \| variable "  > cpp.tags
  linkify/linkify cpp.tags html/*.cc.html
  rm cpp.tags
  ctags -x [0-9]*.mu  > mu.tags
  linkify/linkify mu.tags html/[0-9]*.mu.html
  for f in [a-zA-Z]*.mu
  do
    ctags -x [0-9]*.mu $f  > mu.tags
    linkify/linkify mu.tags html/$f.html
  done
  rm mu.tags
  ( cd edit
    ctags -x ../[0-9]*.mu *.mu  > mu.tags
    ../linkify/linkify mu.tags ../html/edit/*.mu.html
    rm mu.tags
  )
  ( cd linkify; clean; )
  for f in html/*.html html/edit/*.html
  do
    mv $f.out $f
  done
fi