blob: 0b7a66382fc36928d4629b41973b91ba19c7f3f2 (
about) (
plain) (
blame)
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
|
#!/bin/sh
# Copyright (c) 2006-2007 Jilles Tjoelker
# See doc/LICENSE for licensing terms
#
# Script to create simple HTML from the help files
htmldir=${1:-../htmlhelp}
helpdir=${2:-../help/default}
mkdir -p "$htmldir"
{
echo "<html><head><title>Atheme help</title>"
echo "<meta name=\"generator\" content=\"atheme html_helpfiles.sh\">"
echo "</head><body>"
echo "<h1>Atheme help</h1>"
echo "Services"
echo "<ul>"
for d in $helpdir/*; do
[ -d "$d" ] || continue
service="${d##*/}"
case "$service" in
alis) service=ALIS ;;
botserv) service=BotServ ;;
cservice) service=ChanServ ;;
gservice) service=Global ;;
groupserv) service=GroupServ ;;
helpserv) service=HelpServ ;;
hostserv) service=HostServ ;;
memoserv) service=MemoServ ;;
nickserv) service=NickServ ;;
oservice) service=OperServ ;;
userserv) service=UserServ ;;
gameserv) service=GameServ ;;
infoserv) service=InfoServ ;;
*) continue ;;
esac
echo "<li><a href=\"$service.html\">$service</a>"
{
echo "<html><head><title>Atheme help - $service</title>"
echo "<meta name=\"generator\" content=\"atheme html_helpfiles.sh\">"
echo "</head><body>"
echo "</head><body>"
echo "<h1>$service</h1>"
for f in $d/*; do
[ -f "$f" ] || continue
sed -e '/^#/d' -e 's/</\</g' -e 's/>/\>/g' -e "s/&nick&/$service/g" -e 's#^Help for \(.*\).*#<a name="\1"><h2>\1</h2></a>#' -e 's#^Examples*:$#<strong>&</strong>#' -e 's#^Syntax: \(.*\)$#<strong>Syntax:</strong> <tt>\1</tt><br>#' -e 's#\([^]*\)#<b>\1</b>#g' -e 's#\([^]*\)#<u>\1</u>#g' -e 's#^$#<p>#' -e 's#^ \(.*\)$#<br><tt>\1</tt>#' $f
done
echo "</body></html>"
} > "$htmldir/$service.html"
done
echo "</ul>"
echo "<p><i>Generated `LC_ALL=C date`</i>"
echo "</body></html>"
} > "$htmldir/index.html"
|