summaryrefslogtreecommitdiff
path: root/docs/old/generate
blob: c01cb57d3a92a20d6b1981314c6e93763dbe658c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
LANGUAGE="en"
if [ $1 ]
  then LANGUAGE=$1;
fi

if ! [ -d $LANGUAGE ]
  then echo $LANGUAGE" is not an appropriate locale."; exit;
fi

echo "Generate documentation for "$LANGUAGE"."

cd $LANGUAGE

for file in `ls *.t2t`
do
  name=${file:0:${#file}-4}
  txt2tags -q --encoding utf-8 --css-sugar --style style.css --toc -t xhtml -o ../$name".html" $file
  txt2tags -q --encoding utf-8 --toc -t txt -o ../$name $file
done