.
[vo2html.git] / example.zsh
blob8ad8444aa05f3e7d991e43d77085a80be15836bc
1 #!/bin/zsh
2 function tags() {
3 for f in *otl; do
4 grep _tag_ $f 2>&1 1>/dev/null && ~/bin/vo_maketags.pl $f
5 done
8 function web() {
9 [[ ! -e web ]] && mkdir web
10 cd web
11 rm *.html
12 for f in ../*otl; do
13 ff=$(echo $f | sed 's/\.\.\///g;')
14 fff=$(echo $f | sed 's/.otl/.html/g;s/\.\.\///g;')
15 title=$(echo $ff | sed 's/.otl//g')
16 echo "$f -> $ff -> $fff"
17 ../tohtml -v title=$title $f > $fff
18 done
19 cp ../style.css .
20 cat << eof > index.html
21 <html>
22 <frameset border=0 frameborder=0 framespacing=0 rows=25,* marginwidth=0>
23 <frame name=menue src=./menue.html scrolling=no>
24 <frame name=main src=today.html scrolling=auto>
25 </frameset>
26 </html>
27 eof
29 cat << eof > menue.html
30 <html>
32 <head>
33 <base target="main">
34 <link href="./style.css" rel=stylesheet type=text/css>
35 </head>
38 <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" class=head>
39 <table width="100%" border="0" height="100%" cellpadding="0" cellspacing="0"><tr><td valign=left>
40 &nbsp;&nbsp;&nbsp;
41 [<a href=today.html>Heute</a>] &nbsp;&nbsp;&nbsp;
42 </td><td valign=right align=right>
43 [<a href="ABC">CBA</a>]
44 </td></tr></table>
45 </body>
46 </html>
47 eof
49 REMOTE=USER@HOST:DIR/.
51 rsync -avP --delete . $REMOTE
54 tags
55 [[ -z $1 ]] && web