3
# This file is part of XPilot and is Copyright (C) 2002 by
4
# the XPilot authors; see provided LICENSE file for details.
6
# Convert the unformatted XPilot text FAQ to HTML.
10
echo "No readable file named FAQ could be found!"
14
cat > FAQ.html << END_OF_HEADER
15
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
17
This is the Frequently Asked Questions list With Answers for XPilot.
24
-e '/^From:/,/^Keywords:/d' \
25
-e 's|<URL:\([^>]*\)>|<A HREF="\1">\1</A>|g' \
26
-e '/^Questions:/,/^Answers:/s|^\([0-9]\+\)) \(.*\)|\1. <A NAME="Q\1" HREF="#A\1">\2</A>|' \
27
-e '/^Answers:/,/^EOFAQ/s|^\([0-9]\+\)) \(.*\)|<B><A NAME="A\1" HREF="#Q\1">\1.</A> \2</B>|' \
28
-e '/^New questions .*:/s|\([0-9]\+\)|<A HREF="#A\1">\1</A>|g' \
29
-e '/^Questions changed .*:/s|\([0-9]\+\)|<A HREF="#A\1">\1</A>|g' \
30
-e 's|\(question \)\([0-9]\+\)|<A HREF="#A\2">\1\2</A>|g' \
31
-e 's|^\([A-Z][-a-zA-Z_]\+:\)|<B>\1</B>|' \
32
-e 's|^\([a-z]\{1,3\}[.)]\) |<B>\1</B> |' \
33
-e 's|^EOFAQ$|<B>EOFAQ</B>|' \
34
-e 's|^ \(.*\)|<DD> \1</DD>|' \
35
-e '/<pre>/,/<\/pre>/!s|\(.\)$|\1<BR>|' \
36
-e '/<pre>/,/<\/pre>/!s|^$|<P>|' \
39
cat >> FAQ.html << END_OF_TRAILER