about summary refs log tree commit diff stats
path: root/archive/1.vm/032array.cc
Commit message (Expand)AuthorAgeFilesLines
* 5852Kartik Agaram2020-01-011-0/+635
Blame the previous revision' href='/akkartik/mu/blame/update_html?h=main&id=06f3cebe3eb627e18910b6394bfde88c806c8f91'>^
5008a4ec ^
4bbd3ded ^
76a56bc9 ^

9e45cae0 ^
ba6621b5 ^

f5465e12 ^
d55e7738 ^
ba6621b5 ^
9e45cae0 ^
ba6621b5 ^


e4ac3c9e ^

ba6621b5 ^
e5c11a51 ^
f5465e12 ^
cdf28227 ^
f5465e12 ^
e4ac3c9e ^


2564eb6f ^

f5465e12 ^
08a0eed6 ^

ccae4585 ^





f5465e12 ^


b89ce8e4 ^






c9bda4d1 ^

a220427e ^
5008a4ec ^
08a0eed6 ^


c9bda4d1 ^
08a0eed6 ^
5008a4ec ^
c9bda4d1 ^


08a0eed6 ^


b89ce8e4 ^








c762564b ^
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
           
                        
                                                        
 

      
                                           

                                       
           
                    
                 
                                      


                                  

                                                     
                
                                                   
 
                                                
                                             


                                                                    

                                                                   
 

                                                  





                                                                                           


                                 






                                                                                                       

                            
  
                                                


            
                    
  
                                                


                                                


            








                                                
            
#!/bin/bash
# Regenerate html files.
# If given a single argument, regenerate just that file.

set -e

( cd tools; c++ -g linkify.cc -o linkify; )

# generate html/$1.html using /tmp/tags
process() {
  rm -f html/$1.html
  convert_html $1
  tools/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

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

for f in apps/*.mu
do
  test $# -gt 0  &&  test $1 != $f  &&  continue
  ( cd apps
    ctags -x ../*.subx `basename $f` > /tmp/tags
  )
  process $f
done

rm /tmp/tags