[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-gengetopt] convert ggo file to man page
From: |
Yegor Yefremov |
Subject: |
Re: [help-gengetopt] convert ggo file to man page |
Date: |
Fri, 18 Sep 2009 11:02:55 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
>> Do you have any solution on how to format examples so that they look
>> correct in both gengetopt help and man page? I'd like to have it in
>> the following form:
>>
>> 1. if example and its description are short enough they should be
>> placed on the same line with a tab between them
>> 2. if example and its description are longer then place the
>> description below and make some indentation as for the options.
>
> Yegor, I tried with this reduced .ggo file (I modified it):
>
> # Name of your program
> package "hwtest" # don't use package if you're using automake
> # Version of your program
> version "1.2.1" # don't use version if you're using automake
>
> args "--conf-parser"
>
> # Options
> section "Common options"
> sectiondesc="this options are common to all test modules"
> text ""
> option "cfg" - "Configuration file" string typestr="filename"
> optional
> option "cycles" - "Number of test cycles" int default="0" optional
> text "\n"
> text "Examples:\n\n"
>
> text "hwtest --cycles=1 --size=4096 --net --verbose\n\n"
> text "execute network test with 4096 byte big test file in verbose mode\n"
> text "\n"
>
> text "hwtest --cycles=1 --mpci\n"
> text "execute MiniPCI test\n"
> text "\n"
>
> and the first line of help is formatted correctly by help2man, since it
> contains a double \n (while the second one is not, since it contains
> only one \n):
>
> EXAMPLES
> hwtest --cycles=1 --size=4096 --net --verbose
>
> execute network test with 4096 byte big test file in verbose mode
>
> hwtest --cycles=1 --mpci execute MiniPCI test
>
> so it's just a matter of formatting the examples text as help2man
> expects, I guess...
>
> or am I missing something?
Thank you for this example. I'll follow your advice and add extra \n for now.
But what I wanted to say was, I'd like examples to be handled as options. Like
this:
section "Examples" (perhaps without sectiondesc)
example "example string" - "examples description"
and the formatting should also be the same as for the options. What do you
think about it?
Regards,
Yegor
- [help-gengetopt] convert ggo file to man page, Yegor Yefremov, 2009/09/16
- Re: [help-gengetopt] convert ggo file to man page, Salvatore Santagati, 2009/09/16
- Re: [help-gengetopt] convert ggo file to man page, Lorenzo Bettini, 2009/09/16
- Re: [help-gengetopt] convert ggo file to man page, Yegor Yefremov, 2009/09/16
- Re: [help-gengetopt] convert ggo file to man page, Lorenzo Bettini, 2009/09/16
- Message not available
- Message not available
- Re: [help-gengetopt] convert ggo file to man page, Yegor Yefremov, 2009/09/16
- Re: [help-gengetopt] convert ggo file to man page, Yegor Yefremov, 2009/09/17
- Re: [help-gengetopt] convert ggo file to man page, Lorenzo Bettini, 2009/09/17
- Re: [help-gengetopt] convert ggo file to man page,
Yegor Yefremov <=
- Re: [help-gengetopt] convert ggo file to man page, Andre Noll, 2009/09/16
- Re: [help-gengetopt] convert ggo file to man page, Lorenzo Bettini, 2009/09/16
- Re: [help-gengetopt] convert ggo file to man page, Andre Noll, 2009/09/17
- Re: [help-gengetopt] convert ggo file to man page, Lorenzo Bettini, 2009/09/17
- Re: [help-gengetopt] convert ggo file to man page, Andre Noll, 2009/09/17