|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
convert ggo file to man pageHi Lorenzo,
where it possible to automatically create a man page from ggo file? It would be a great feature. Thank you in advance. Best regards, Yegor _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageWell, I believe is a good idea also if possible create a man page with help2man
Salvatore On Wed, Sep 16, 2009 at 2:53 PM, Yegor Yefremov <yegor_sub1@...> wrote: > > Hi Lorenzo, > > where it possible to automatically create a man page from ggo file? It would be a great feature. > > Thank you in advance. > > Best regards, > Yegor > > > _______________________________________________ > Help-gengetopt mailing list > Help-gengetopt@... > http://lists.gnu.org/mailman/listinfo/help-gengetopt _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageactually gengetopt itself creates its man page using help2man: once you
have your program (that uses the gengetopt generated parser), you can build the manpage with help2man, e.g., help2man yourprogram for gengetopt I do help2man ./gengetopt --help-option="--detailed-help" > gengetopt.1 cheers Lorenzo Salvatore Santagati wrote: > Well, I believe is a good idea also if possible create a man page with help2man > > Salvatore > > > On Wed, Sep 16, 2009 at 2:53 PM, Yegor Yefremov > <yegor_sub1@...> wrote: >> Hi Lorenzo, >> >> where it possible to automatically create a man page from ggo file? It would be a great feature. >> >> Thank you in advance. >> -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageThank you for your answers. help2man rocks!
Regards, Yegor > actually gengetopt itself creates its man page using help2man: once you > have your program (that uses the gengetopt generated parser), you can > build the manpage with help2man, e.g., > > help2man yourprogram > > for gengetopt I do > > help2man ./gengetopt --help-option="--detailed-help" > gengetopt.1 > > cheers > Lorenzo > > Salvatore Santagati wrote: >> Well, I believe is a good idea also if possible create a man page with >> help2man >> >> Salvatore >> >> >> On Wed, Sep 16, 2009 at 2:53 PM, Yegor Yefremov >> <yegor_sub1@...> wrote: >>> Hi Lorenzo, >>> >>> where it possible to automatically create a man page from ggo file? >>> It would be a great feature. >>> >>> Thank you in advance. >>> > > > _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageIt does :-)
and I discovered it while developing gengetopt actually! Yegor Yefremov wrote: > Thank you for your answers. help2man rocks! > > Regards, > Yegor > >> actually gengetopt itself creates its man page using help2man: once you >> have your program (that uses the gengetopt generated parser), you can >> build the manpage with help2man, e.g., >> >> help2man yourprogram >> >> for gengetopt I do >> >> help2man ./gengetopt --help-option="--detailed-help" > gengetopt.1 >> >> cheers >> Lorenzo >> >> Salvatore Santagati wrote: >>> Well, I believe is a good idea also if possible create a man page with >>> help2man >>> >>> Salvatore >>> >>> >>> On Wed, Sep 16, 2009 at 2:53 PM, Yegor Yefremov >>> <yegor_sub1@...> wrote: >>>> Hi Lorenzo, >>>> >>>> where it possible to automatically create a man page from ggo file? >>>> It would be a great feature. >>>> >>>> Thank you in advance. >>>> >> >> > > > > _______________________________________________ > Help-gengetopt mailing list > Help-gengetopt@... > http://lists.gnu.org/mailman/listinfo/help-gengetopt -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
|
|
|
Re: convert ggo file to man pageOn 16:26, Lorenzo Bettini wrote:
> actually gengetopt itself creates its man page using help2man: once you > have your program (that uses the gengetopt generated parser), you can > build the manpage with help2man, e.g., > > help2man yourprogram True. But this does not work when cross-compiling. Would it be difficult to implement something like gengetopt --print-detailed-help < my.ggo which would output the detailed help text directly? Regards Andre -- The only person who always got his work done by Friday was Robinson Crusoe _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageAndre Noll wrote:
> On 16:26, Lorenzo Bettini wrote: >> actually gengetopt itself creates its man page using help2man: once you >> have your program (that uses the gengetopt generated parser), you can >> build the manpage with help2man, e.g., >> >> help2man yourprogram > > True. But this does not work when cross-compiling. Would it be > difficult to implement something like > > gengetopt --print-detailed-help < my.ggo > > which would output the detailed help text directly? > there are already options for this :-) --show-help show the output of --help instead of generating code --show-full-help show the output of --full-help (i.e., including hidden options) instead of generating code --show-detailed-help show the output of --detailed-help (i.e., including details and hidden options) instead of generating code --show-version show the output of --version instead of generating code -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageOn 19:13, Lorenzo Bettini wrote:
> Andre Noll wrote: > >On 16:26, Lorenzo Bettini wrote: > >>actually gengetopt itself creates its man page using help2man: once you > >>have your program (that uses the gengetopt generated parser), you can > >>build the manpage with help2man, e.g., > >> > >>help2man yourprogram > > > >True. But this does not work when cross-compiling. Would it be > >difficult to implement something like > > > > gengetopt --print-detailed-help < my.ggo > > > >which would output the detailed help text directly? > > > > there are already options for this :-) Thanks for pointing that out, and sorry for not RTFM. Andre -- The only person who always got his work done by Friday was Robinson Crusoe _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageAndre Noll wrote:
> On 19:13, Lorenzo Bettini wrote: >> Andre Noll wrote: >>> On 16:26, Lorenzo Bettini wrote: >>>> actually gengetopt itself creates its man page using help2man: once you >>>> have your program (that uses the gengetopt generated parser), you can >>>> build the manpage with help2man, e.g., >>>> >>>> help2man yourprogram >>> True. But this does not work when cross-compiling. Would it be >>> difficult to implement something like >>> >>> gengetopt --print-detailed-help < my.ggo >>> >>> which would output the detailed help text directly? >>> >> there are already options for this :-) > > Wow :) > Thanks for pointing that out, and sorry for not RTFM. No problem :-) but does this solve the problem of cross-compiling? Moreover, I guess help2man expects a program name, not a simple output? cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageOn 11:29, Lorenzo Bettini wrote:
> >>>True. But this does not work when cross-compiling. Would it be > >>>difficult to implement something like > >>> > >>> gengetopt --print-detailed-help < my.ggo > >>> > >>>which would output the detailed help text directly? > >>> > >>there are already options for this :-) > > > >Wow :) > >Thanks for pointing that out, and sorry for not RTFM. > > No problem :-) > but does this solve the problem of cross-compiling? > Moreover, I guess help2man expects a program name, not a simple output? instead of insisting to call an executable to obtain its input, the cross-compiling problem would be solved. But that's not a real problem because one can always use a shell script wrapper like #!/bin/sh case $1 in --help) gengetopt --show-help < my.ggo;; --detailed-help) gengetopt --show-detailed-help < my.ggo;; esac Best Andre -- The only person who always got his work done by Friday was Robinson Crusoe _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageDo 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. Regards, Yegor > It is the smallest problem ;-) It is older version at our public repo. > I've locally changed "Usage examples" to "Examples", so I get EXAMPLES > section. But the examples itself look like this in hwtest --help: > > hwtest --cycles=1 --usb --usbmntdev=/dev/sda1 > execute USB test for the first detected mass storage device > > and so they look in man page: > > hwtest --cycles=1 --usb --usbmntdev=/dev/sda1 execute USB test for the > first detected mass storage device > > Regards, > Yegor >> From the example at the GNU site, it looks like help2man expects an >> "Examples:" section, while your goo has "Usage examples:"; isn't it >> the problem? >> >> Yegor Yefremov wrote: >>> It were also useful to have a real EXAMPLES section, where one could >>> place examples with special tags, so it looks like here >>> http://www.gnu.org/software/help2man/#example. I get only complete >>> strings despite of setting \n between the example and its >>> description. See my ggo file >>> http://svn.visionsystems.de/cgi-bin/viewvc.cgi/trunk/hwtest/hwtest.ggo?root=OpenRISC_Software&view=markup >>> >>> >>>> It does :-) >>>> and I discovered it while developing gengetopt actually! >>>> >>>> Yegor Yefremov wrote: >>>>> Thank you for your answers. help2man rocks! >>>>> >>>>> Regards, >>>>> Yegor >>>>> >>>>>> actually gengetopt itself creates its man page using help2man: >>>>>> once you >>>>>> have your program (that uses the gengetopt generated parser), you can >>>>>> build the manpage with help2man, e.g., >>>>>> >>>>>> help2man yourprogram >>>>>> >>>>>> for gengetopt I do >>>>>> >>>>>> help2man ./gengetopt --help-option="--detailed-help" > gengetopt.1 >>>>>> >>>>>> cheers >>>>>> Lorenzo >>>>>> >>>>>> Salvatore Santagati wrote: >>>>>>> Well, I believe is a good idea also if possible create a man page >>>>>>> with >>>>>>> help2man >>>>>>> >>>>>>> Salvatore >>>>>>> >>>>>>> >>>>>>> On Wed, Sep 16, 2009 at 2:53 PM, Yegor Yefremov >>>>>>> <yegor_sub1@...> wrote: >>>>>>>> Hi Lorenzo, >>>>>>>> >>>>>>>> where it possible to automatically create a man page from ggo file? >>>>>>>> It would be a great feature. >>>>>>>> >>>>>>>> Thank you in advance. >>>>>>>> >>>>> >>>>> _______________________________________________ >>>>> Help-gengetopt mailing list >>>>> Help-gengetopt@... >>>>> http://lists.gnu.org/mailman/listinfo/help-gengetopt >> > > > > _______________________________________________ > Help-gengetopt mailing list > Help-gengetopt@... > http://lists.gnu.org/mailman/listinfo/help-gengetopt > _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man pageYegor Yefremov wrote:
> 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. > > Regards, > Yegor > 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? cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: convert ggo file to man page>> 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 mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
| Free embeddable forum powered by Nabble | Forum Help |