[Top][All Lists]

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

Re: [help-gengetopt] Re: Another Wish

From: Lorenzo Bettini
Subject: Re: [help-gengetopt] Re: Another Wish
Date: Sat, 05 May 2007 11:48:09 +0200
User-agent: Icedove (X11/20070329)

- Tong - wrote:
> Sorry for responding late... was busy last 2 weeks. 

no problem: I was late too when answering your previous post ;-)

> gengetopt really grows very fast. Looking back on my request that's several
> months ago, and looking at the current feature in gengetopt that allows
> nicely formatted multi-line text, the xml format is not a must any more. 

happy to hear that :-)

> Hope that we will have the 'details="<very long help description>"' option
> soon. Please also add an option --show-detailed-help or something apart from
> the --show-help option, so as to show such detailed help.

OK, this sound reasonable; I assume that --show-detailed-help will also
show hidden options, isn't it?  Otherwise we would end up with too many
help options

Moreover, where would the detailed output be best put?

 --option            "description............"

                     "long description"


 --option            "description............"

   "long description"


> I'm really excited to anticipate that the "details" option be
> implemented. Because, after that, the gengetopt will no longer generate
> getopt code only any more -- it can generate man pages as well!

at the moment you can already have a generated man page, by using the
help output and help2man (see the automatically generated man page for
gengetopt itself).

> The beauty of generating man pages is that we don't need to fiddle with man
> page format ourselves. There is already a good tools for it -- AsciiDoc
> I've been using asciidoc for quite a while and highly recommend it.  You
> just format plain text file according to its simple and clear format, it
> will handle the rest of html/manpage generation for you. If you want to skim
> through what it is capable of, check out my
> AsciiDoc Markup Syntax Quick Summary

I don't know about asciidoc; so you'd use this one to get the man page?
 From gengetopt --help option?  In case, you'd need to format the
description part of gengetopt options according to its syntax?  But
then, those asciidoc syntax parts should be removed from --help output?
 Or am I missing something?

> The actually reason that I requested xml format config file is that, I was
> hoping that gengetopt to be the de-factor all purpose program doc generation
> tool. I.e., not only to generate getopt code and man pages for C program,
> but all other programs as well --
> Currently, the .ggo format is "proprietary" to gengetopt. Forgive me not
> being able to choose a better word, I mean, if we use xml format config
> file, all the other language can use the file as well, e.g., Perl, Python.
> For example, if the config file is in xml format, then an experienced Perl
> programmer can write a script to generate code to use Getopt::Long in less
> than half a day. And I can adapt such script to generate shell script that
> use gnu getopt in less than half a day as well. Generating asciidoc format
> file for manpage generation will be less than an hour. I believe the same
> time frame applies to Python too, but I don't know Python myself.
> Well, that's my ambitious goal. But if there is no such request currently,
> there is no point maintaining two interfaces now. 

I think I'm getting the point!

However, one current possible "easy" solution is to let gengetopt
generate xml code from the .ggo file?

Furthermore, I'd like gengetopt to generate code for other languages
too, e.g., Java, and other languages I don't actually know, e.g. Perl
and Python that you cited.

> However, if one day when you do think it is time for the xml format config
> file, post to mlist and cc my account @suntong001. I'd like
> to help. I had experience with parsing xml in c code before, using the
> existing c lib. It's quite trivial. I bet doing it again with apache's C++
> lib would be even more simpler.

what do you think about the possibility of letting gengetopt generate
xml code from the .ggo file?

I hope to hear from you soon

Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]