KDE man page generator..

Dominique Devriese dominique.devriese at student.kuleuven.ac.be
Fri Jul 18 14:51:23 BST 2003


In order to fix long-standing Debian bug #116485, I've written a
script that takes a KDE app, and generates a nice man page..  It uses
the app's "--author" and "--help-all" output, along with a description
from Debian's control file to get the data.  I think the script works
great, the man pages look almost hand-written ;) I encourage you all
to try this out, and very much welcome any feedback, especially as to
how to integrate this into either the Debian KDE packaging system or
the KDE build system..

The idea to do this with a script allows us to easily keep the man
pages up to date, and is generally very low-trouble for the

The script is attached at the bottom..

Suppose you wanted to generate a man page for the KDE-Edu program
kalzium..  Then you would
1 cd to /path/to/kde/srcs/kdeedu/debian  ( necessary so the script
  finds the Debian control file.. )
2 run "/path/to/kdemangen.pl $(which kstars) > kstars.1"
3 run "cat kstars.1 | groff -man -Tascii | less" to check out the
  generated page..

1 Only works for full KDE applications that use KCmdLineArgs (
  inherent to my approach, but most KDE apps fulfill this requirement
2 I can't seem to find a way to make the applications *not* output
  translated stuff..  I've tried with "KDE_LANG=C $runapp ..", but to
  no avail..  I'm prolly just missing something stupid here..

I'm thinking about some way to integrate this into either the Debian
KDE packaging system, the KDE build system.  I might also upload it to
kdesdk/scripts/..  I would very much appreciate feedback here !!

As for the dependency on the debian control file, I'm thinking about
removing this, and letting the user provide the description as a
command line option, so that the debian folks can still give the
description from the control file if they would want that..

Don't complain about my perl style, I know I suck at it ;)

Thanks for reading

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdemangen.pl
Type: application/x-perl
Size: 2342 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030718/1dff06f6/attachment.bin>
-------------- next part --------------

[1]  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=116485

More information about the kde-core-devel mailing list