summaryrefslogtreecommitdiff
path: root/docs/t2t/generate
diff options
context:
space:
mode:
Diffstat (limited to 'docs/t2t/generate')
-rwxr-xr-xdocs/t2t/generate21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/t2t/generate b/docs/t2t/generate
new file mode 100755
index 0000000..c01cb57
--- /dev/null
+++ b/docs/t2t/generate
@@ -0,0 +1,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
+