summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-05-13 16:57:06 +0200
committerJoel Andres Granados <jgranado@redhat.com>2008-05-27 14:57:12 +0200
commit158b545b5b2a343d92a46e2a4498d2195f6852ba (patch)
tree2cc0c5e243a3b0e6bff6abce91a35a6a457bf3a6 /doc
parentac672d07123a85c03a2bbf0067dbed438b30957b (diff)
downloadfirstaidkit-158b545b5b2a343d92a46e2a4498d2195f6852ba.tar.gz
firstaidkit-158b545b5b2a343d92a46e2a4498d2195f6852ba.tar.xz
firstaidkit-158b545b5b2a343d92a46e2a4498d2195f6852ba.zip
The script that will help turn the man pages into wiki pages.
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/man2wiki28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/man2wiki b/doc/man2wiki
new file mode 100755
index 0000000..cc7030b
--- /dev/null
+++ b/doc/man2wiki
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+#
+# This script allows the transformation of man page tags to wiki tags.
+# This script will only include the tags used in firstaidkit and is
+# intented to help rather than create complete wiki pages. The work
+# needed for the resulting page is very little.
+#
+DEFAULT_CHANGE_FILES=" firstaidkit.1
+ firstaidkit-flags.1
+ firstaidkit-plugin.1"
+
+#
+# Aside from the default files you can add your oun files.
+#
+CHANGE_FILES="$DEFAULT_CHANGE_FILES $*"
+
+for file in $CHANGE_FILES ; do
+ sed \
+ -e "s/\(^\.SH[ \t]*\"\)\([^\"]*\)\(\"[ \t]*\)\(.*\)/= \2 \4 =/" \
+ -e "s/\(^\.IP[ \t]*\"\)\([^\"]*\)\(\".*\)/[[BR]]'''\2'''[[BR]]/" \
+ -e "s/^\.br.*/[[BR]]/" \
+ -e "s/^\.BR.*/[[BR]]/" \
+ -e "s/^\.PP.*//" \
+ -e "s/^\.nf.*//" \
+ -e "s/^\.fi.*//" \
+ < $file > $file-wiki
+done