blob: caaa6e15c25f0ad59be1e9fc5653e13809efb8f6 (
plain)
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
|
#!/bin/sh
processline()
{
echo "- $1 -"
name="$1"
# I changed "0" to "$" because my sed
# doesn't want to understand "0".
# -- Zoltan
cat xaos.hlp | sed '1,/%'"$1"'/d;/^%/,$ d' | sed \
'1,2s_<head>\([^<]*\)</head>_<!-- X-URL: http://xaos.sf.net/help/'"$1"' -->\
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\
<HTML>\
<HEAD>\
<LINK rev=made href="mailto:jh@ucw.cz">\
<META name="description" content="XaoS online help '"$1"'>\
<META name="keywords" content="XaoS, realtime, fractal, zoomer">\
<TITLE>XaoS online help - \1</TITLE>\
</HEAD>\
<BODY BGCOLOR="#ffffff" TEXT="#594941">\
<CENTER><A HREF="main.html"><IMG BORDER=0 ALT="XaoS online help" SRC="help.jpg"></A>\
<H1><A NAME="body">\1</A></H1></CENTER>\
_g
s_<head>_<center><H2>_g
s_</head>_</H2></center>_g
s_<emph>_<strong>_g
s_<submenu>__g
s_<menuhead>__g
s_</menuhead>__g
s_<mainmenu>__g
s_<menuitems>__g
s_<notex>__g
s_</notex>__g
s_<node.*>__g
s_</emph>_</strong>_g
s_<tt>_<code>_g
s_</tt>_</code>_g
s_<tutor [^>]*>_<i>_g
s_</tutor>_</i>_g
s_<a \([^>]*\)>_<A HREF="\1.html#body">_g
s/'\'\''/"/g
s/``/"/g' > $1.html
echo "</BODY></HTML>" >> $1.html
shift
while [ "$1" != "" ] ; do
echo Link "$1" "$name"
if [ "$1" != "$name" ] ; then
ln -sf $name.html $1.html
fi
shift
done
}
process()
{
while read line ; do
eval "processline $line"
done
}
grep "^%" xaos.hlp | sed '/%%/d;s/%//g' | process
rm -f index.html
ln -s main.html index.html
|