diff options
Diffstat (limited to 'model_doc/html2info.sh')
-rwxr-xr-x | model_doc/html2info.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/model_doc/html2info.sh b/model_doc/html2info.sh new file mode 100755 index 0000000..8b31144 --- /dev/null +++ b/model_doc/html2info.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +if [ $# -eq 1 ] +then + : +else + echo $# + echo "Usage $0 <base name>" + exit +fi + + +# you need gs-common, pstoedit and skencil to +# get this script working +export BASENAME="`basename $1 .html`"; +echo $BASENAME +#echo "" >>${BASENAME}. +echo "std::string result;">${BASENAME}.info + +cat ${BASENAME}.html|while read -r line +do +line=$(echo -E "$line"|sed -e 's/\\/\\\\/g'|sed -e 's/\"/\\\"/g') +echo "result+=\"$line\";">>${BASENAME}.info +echo "result+=\"\\n\";">>${BASENAME}.info +done + +echo "return result;" >>${BASENAME}.info + + |