2007-10-14 18:14:33 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# Quick hack to generate handbook.txt from pmwiki
|
|
|
|
# Johannes Winkelmann, jw at tks6 dot net
|
|
|
|
|
|
|
|
INFILE=handbook.in
|
|
|
|
OUTFILE=handbook.txt
|
2009-05-28 15:15:04 +02:00
|
|
|
CRUX_VERSION=2.6
|
2007-10-14 18:14:33 +02:00
|
|
|
TITLE="HANDBOOK FOR CRUX $CRUX_VERSION"
|
|
|
|
URL="http://crux.nu/Main/Handbook${CRUX_VERSION/\./-}?action=print"
|
|
|
|
|
|
|
|
set -x
|
|
|
|
links -no-numbering -no-references -dump $URL > $INFILE
|
|
|
|
cat $INFILE|while read n; do
|
|
|
|
if [ -n "$intext" ]; then
|
|
|
|
cat
|
|
|
|
elif [ "$n" = "1. Preface" ]; then
|
|
|
|
echo "$TITLE"
|
|
|
|
echo "";
|
|
|
|
echo " $n";
|
|
|
|
intext="yes";
|
|
|
|
fi
|
|
|
|
done > $OUTFILE
|
|
|
|
|
|
|
|
rm $INFILE
|