diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-05-13 16:57:06 +0200 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-05-27 14:57:12 +0200 |
commit | 158b545b5b2a343d92a46e2a4498d2195f6852ba (patch) | |
tree | 2cc0c5e243a3b0e6bff6abce91a35a6a457bf3a6 /doc | |
parent | ac672d07123a85c03a2bbf0067dbed438b30957b (diff) | |
download | firstaidkit-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-x | doc/man2wiki | 28 |
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 |