1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Files
wmaker/doc/wmmenugen.1
Christophe CURIS 0a009143c3 util: improve the command line argument parsing in wmmenugen
The code ignored the last argument provided on the command line;

It did not support the recommended '--version' and '--help' from GNU which
are often handy;

It used an unusual syntax to specify the parser, now it can also use more
usual "-parser=name" and "-parser name", the old syntax is still supported
to avoid breaking compatibility;

When a problem is found with an argument, the program stops instead of
printing an error message and continuing;

There's been updates on the exit codes in case of problem because it is an
information that could be useful for people calling the program from a
script;

Took the opportunity to provide more information in the man page and to
get it cross-checked against the program's option list during "make check".

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-05-23 18:53:19 +01:00

96 lines
2.3 KiB
Groff

.TH "wmmenugen" "1" "16 May 2015"
.SH "NAME"
\fBwmmenugen\fR \- Window Maker PropList menu generator
.PP
.SH "SYNOPSIS"
.B wmmenugen
.RI [ options ...]
.BI \-parser= <name>
.IR fspec " [" fspec "...]"
.BI \fR[\fP\-parser= <name>
.IR fspec " [" fspec "...]...]"
.SH "DESCRIPTION"
.B wmmenugen
generates a menu in the
.I PropList
format for Window Maker from the input file
.IR fspec .
In the case where
.I fspec
is a directory instead of a file, then
.B wmmenugen
will read all the files present in the hierarchy of this directory.
.SH "OPTIONS"
.TP
.BR \-\-help ", " \-h
print a help message with the list of options
.TP
.B \-parser
specify the format of the file to be parsed
.TP
.B \-\-version
print the version of Window Maker from which the program comes
.SH "PARSERS"
.B wmmenugen
supports these file formats for input files:
.TP
.I wmconfig
the format of the menu generation tool for X of the same name
.TP
.I xdg
the format of the menu specification as defined by the
.I FreeDesktop
standard, currently at version 1.1
.SH "RETURN VALUE"
The exit status from the
.B wmmenugen
command provides information for the caller:
.TP
.B 0
when the
.I PropList
menu was successfully generated on
.IR stdout .
.TP
.B 1
when a
.I fspec
caused a problem (non readable file, ...)
.TP
.B 2
the arguments of the command line where not recognised
.TP
.B 3
the program met an unexpected menu structure;
you probably want to look at the section
.B BUGS
below.
.SH "BUGS"
If you get the exit status
.B 3
with the unclear error message about
.IR "unprocessed levels on the stack" ,
you encountered a limitation of
.BR wmmenugen .
It would be a good idea to prepare an archive with the files incriminated and submit them to the
mailing list (wmaker-dev@lists.windowmaker.org) with you command line, so the team can work on
improving the behaviour of the program on this case.
.SH "SEE ALSO"
.BR wmgenmenu (1),
the tool to generate a default menu
.PP
the
.I Wmconfig
program can be found at:
<http://www.arrishq.net/index.html>
.PP
the
.I xdg
specification can be found at:
<http://standards.freedesktop.org/menu-spec/menu-spec-1.1.html>
.SH "AUTHOR"
wmmenugen is a part of Window Maker. It was written by Tamas TEVESZ.
.PP
This manpage was written by Rodolfo García Peñas (kix) for the
Debian GNU/Linux system (but may be used by others).