From 158b545b5b2a343d92a46e2a4498d2195f6852ba Mon Sep 17 00:00:00 2001 From: Joel Andres Granados Date: Tue, 13 May 2008 16:57:06 +0200 Subject: The script that will help turn the man pages into wiki pages. --- doc/man2wiki | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 doc/man2wiki 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 -- cgit