[dominique devriese student kuleuven ac be: KDE man page generator..]



--- Begin Message ---
Hi,

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
developer...

The script is attached at the bottom..

USAGE:
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..

PROBLEMS:
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..

FUTURE:
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..

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

Thanks for reading
domi

Attachment: kdemangen.pl
Description: Perl program

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


--- End Message ---


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]