6 pod2usage(2) unless defined($program);
8 open ARGTEXT, "$program 2>&1 |" or die "Failed to run $program: $!";
19 my ($name, $deflt, $descr) = /^(\S+)\s+(\S+)\s+(.*)$/;
20 push @args, [$name, $deflt, $descr];
22 die "No arguments found!" unless @args;
25 if (/\.\\\" ### ARGUMENTS ###/) {
27 my ($name, $deflt, $descr) = @$_;
29 $descr =~ s/ (-\S+)/ \\fB\\$1\\fR/g;
46 sphinx_args2man - Generate manual pages from the output of Sphinx programs
50 B<sphinx_args2man> I<PROGRAM> E<lt> I<TEMPLATE> E<gt> I<OUTPUT>
54 This program runs a Sphinx program I<PROGRAM>, reads a template file
55 from standard input, and writes a manual page in L<man(7)> format to
58 The template file is a manual page in L<man(7)> format, containing a
59 comment line of the form:
63 Which will be replaced in the output with the arguments and their
64 descriptions from I<PROGRAM>.
68 David Huggins-Daines <dhuggins@cs.cmu.edu>
72 Copyright (c) 2007 Carnegie Mellon University. You may copy and
73 distribute this file under the same conditions as the rest of
74 PocketSphinx. See the file COPYING for more information.