Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/help/dokuwikiconv
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
commit1030dc837b10a03a02a85d5504cbeec168ce49e2 (patch)
tree698eefa87ac437deaf36a4141b326f8ce7986692 /help/dokuwikiconv
Import XaoS r489 (trunk after version 3.5)
Diffstat (limited to 'help/dokuwikiconv')
-rwxr-xr-xhelp/dokuwikiconv82
1 files changed, 82 insertions, 0 deletions
diff --git a/help/dokuwikiconv b/help/dokuwikiconv
new file mode 100755
index 0000000..83a75c7
--- /dev/null
+++ b/help/dokuwikiconv
@@ -0,0 +1,82 @@
+#!/bin/sh
+processline()
+{
+ echo "- $1 -"
+ name="$1"
+ # I changed "0" to "$" because my sed
+ # doesn't want to understand "0".
+ # -- Zoltan
+ cat xaos.hlp | sed '1,/%'"$1"'/d;/^%/,$ d' | sed \
+'s_<p><tt>_<code>_g
+s_</tt><p>_</code>_g
+s/'\'\''/"/g
+s/``/"/g
+s_LICENSE<p>_LICENSE - _g' | sed \
+'1,2s_<head>\([^<]*\)</head>_====== \1 ======\
+_g
+s_<emph>_**_g
+s_<p>_\
+_g
+s_<head>_===== _g
+s_</head>_ =====\
+_g
+s_<center>__g
+s_</center>__g
+s_<i>_//_g
+s_</i>_//_g
+s_<submenu>__g
+s_<menuhead>__g
+s_</menuhead>__g
+s_<mainmenu>__g
+s_<menuitems>__g
+s_</menuitems>__g
+s_<notex>__g
+s_</notex>__g
+s_<dl>__g
+s_</dl>__g
+s_<dd>__g
+s_</dd>__g
+s_<br>_\
+_g
+s_ [ ]*_ _g
+s_<math>_//_g
+s_</math>_//_g
+s_<dt>_ * _g
+s_</dt>__g
+s_<node.*>__g
+s_</emph>_**_g
+s_<tt>_'\'\''_g
+s_</tt>_'\'\''_g
+s_<tutor [^>]*>_//_g
+s_</tutor>_//_g
+s_<a \([^>]*\)>_[[\1|_g
+s_</a>_]]_g' > $1.txt
+
+ tolower=`echo $1 | awk '{print tolower($1)}'`
+ if [ "$1" != "$tolower" ] ; then
+ ln -sf $1.txt $tolower.txt
+ fi
+
+ shift
+ while [ "$1" != "" ] ; do
+ echo Link "$1" "$name"
+ if [ "$1" != "$name" ] ; then
+ ln -sf $name.txt $1.txt
+ fi
+
+ tolower=`echo $1 | awk '{print tolower($1)}'`
+ if [ "$1" != "$tolower" ] ; then
+ ln -sf $1.txt $tolower.txt
+ fi
+
+
+ shift
+ done
+}
+process()
+{
+ while read line ; do
+ eval "processline $line"
+ done
+}
+grep "^%" xaos.hlp | sed '/%%/d;s/%//g' | process