aboutsummaryrefslogtreecommitdiffstats
path: root/model_doc/html2info.sh
blob: 8b311441f23b1352ebad889b6aa126a69056c300 (plain)
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
#!/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