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 > 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 >>>>>>> <[email protected]> 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 >>>>> [email protected] >>>>> http://lists.gnu.org/mailman/listinfo/help-gengetopt >> > > > > _______________________________________________ > Help-gengetopt mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-gengetopt > _______________________________________________ Help-gengetopt mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gengetopt
