summaryrefslogtreecommitdiff
path: root/helpcontent2/help-to-wiki.py
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-11-05 14:04:27 +0100
committerJan Holesovsky <kendy@suse.cz>2010-11-05 14:04:27 +0100
commitc3760ab69952dec6b62c21efa9ea743f8e81940f (patch)
tree7addfa29635b6395388ebbdcb5bc252ac790b535 /helpcontent2/help-to-wiki.py
parent962aaaced4539cc648cdd8236c36dadd4e77a871 (diff)
Update the help -> wiki conversion scripts to work inside helpcontent2.
Diffstat (limited to 'helpcontent2/help-to-wiki.py')
-rwxr-xr-xhelpcontent2/help-to-wiki.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/helpcontent2/help-to-wiki.py b/helpcontent2/help-to-wiki.py
new file mode 100755
index 0000000000..5ed0e6c1c7
--- /dev/null
+++ b/helpcontent2/help-to-wiki.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+import sys, os
+
+# FIXME do proper modules from getalltitles & wikiconv2
+# [so far this is in fact just a shell thing]
+
+def create_wiki_dirs():
+ dirs = [
+ "Basic",
+ "Calc",
+ "Chart",
+ "Draw",
+ "All",
+ "Impress",
+ "Math",
+ "Writer"
+ ]
+
+ try:
+ os.mkdir( "wiki" )
+ except:
+ sys.stdout.write( "wiki already generated - the wiki/ subdir exists\n" )
+ sys.exit( 1 )
+
+ for i in dirs:
+ try:
+ os.mkdir( "wiki/" + i )
+ except:
+ pass
+
+# do the work
+create_wiki_dirs()
+
+os.system( "python to-wiki/getalltitles.py source/text > alltitles.csv" )
+os.system( "python to-wiki/convall.py source/text" )