2015-12-20 14:31:17 +01:00
|
|
|
#!/bin/bash
|
2006-09-04 10:26:34 +02:00
|
|
|
|
|
|
|
cd ../yo
|
|
|
|
|
2015-12-20 14:31:17 +01:00
|
|
|
if [ "$1" == "kindle" ] ; then
|
|
|
|
echo "<style>" > cplusplus.kindle
|
|
|
|
grep -v 'overflow-x\|max-width' cplusplus.css >> cplusplus.kindle
|
|
|
|
echo "</style>" >> cplusplus.kindle
|
|
|
|
KINDLE="-Dkindle"
|
|
|
|
fi
|
|
|
|
|
2006-09-04 10:26:34 +02:00
|
|
|
echo 1>&2 "
|
|
|
|
Construct html files from `pwd`.
|
|
|
|
Converting .yo to .html
|
|
|
|
"
|
|
|
|
|
2014-09-14 12:09:56 +02:00
|
|
|
PATH=`pwd`/tmp/bin:$PATH
|
2015-12-20 14:31:17 +01:00
|
|
|
yodl2html --no-warnings -l3 $KINDLE cplusplus
|
2006-09-04 10:26:34 +02:00
|
|
|
|
2007-07-30 12:47:25 +02:00
|
|
|
if [ $? != 0 ] ; then
|
|
|
|
echo html conversion failed
|
|
|
|
exit 1
|
|
|
|
fi
|
2006-09-04 10:26:34 +02:00
|
|
|
|
2015-12-20 14:31:17 +01:00
|
|
|
if [ "$1" == "kindle" ] ; then
|
|
|
|
rm cplusplus.kindle
|
|
|
|
fi
|
|
|
|
|
2006-09-04 10:26:34 +02:00
|
|
|
echo 1>&2 "
|
|
|
|
Moving .html files to ../html
|
|
|
|
"
|
|
|
|
|
|
|
|
mv *.html ../html
|
|
|
|
|
|
|
|
cd ../html
|
|
|
|
|
|
|
|
echo 1>&2 "
|
|
|
|
Removing extra blank lines around <pre> ... </pre> tags.
|
|
|
|
"
|
|
|
|
|
|
|
|
../bin/patchhtmlpre
|
|
|
|
|
|
|
|
echo 1>&2 "
|
|
|
|
Constructing contentspage in `pwd`.
|
|
|
|
"
|
|
|
|
|
|
|
|
../bin/htmlcontentspage > contents.html
|
|
|
|
|
|
|
|
echo 1>&2 "
|
|
|
|
Constructing the html-index.
|
|
|
|
"
|
|
|
|
|
|
|
|
../bin/htmlindex # construct index page
|
|
|
|
|
2007-07-30 12:47:25 +02:00
|
|
|
if [ $? != 0 ] ; then
|
|
|
|
echo index construction not without errors
|
|
|
|
exit 1
|
|
|
|
fi
|
2006-09-04 10:26:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
echo 1>&2 "
|
|
|
|
Removing <index ...> entries from cplusplusXX.html files.
|
|
|
|
"
|
|
|
|
|
|
|
|
../bin/patchhtmlindexentries
|
|
|
|
|
2015-12-20 14:31:17 +01:00
|
|
|
|
2006-09-04 10:26:34 +02:00
|
|
|
echo 1>&2 "
|
|
|
|
Ready to zip it up
|
|
|
|
"
|
2015-12-20 14:31:17 +01:00
|
|
|
|
|
|
|
[ "$1" != "kindle" ] && exit 0
|
|
|
|
|
|
|
|
echo 1>&2 "The kindle conversion ignored the specifications
|
|
|
|
overflow-x max-width
|
|
|
|
as they are not recognized/supported by kindle.
|
|
|
|
"
|