Converts machine readable command line parser library class annotations (args4j, JCommander) into a variety of human readable text documents. To put it in other words: You document your options for i.e. args4j, and then you can extract the information for other documents using this tool from your Java classes.
The main purpose is to reduce overhead when documenting software.
Two examples can be seen below.
Currently the following command line libraries are supported:
Usage is as follows:
java -jar target/args2all-0.0.1-jar-with-dependencies.jar <OPTIONS>
Where the possible options are listed here (args2all-generated):
-
-charset, -C = CHARSET
The charset encoding to use for the output file.
-
-class, -c = CLASS
Name of the annotated class to read. The annotations are from a library like args4j or JCommander. Note that the class must be loadable from the programs context, meaning reachable from the classpath.
Required
-
-help, -h
Show the command line help.
-
-out, -o = FILE
The output where to write the result to.
Required
-
-template, -t
The template to use for output. This is the output flavor you are desiring to generate.
The all in Args2all is quite limited at the moment. Please read the current options in the next sections.
Outputs a markdown text that is inspired by the layout of UN*X manual pages.
Here's an example of the program itself:
Markdown code can be seen here.
Outputs a partial manual page / troff page that can be used as a
template. The parts of the file that need to be filled are
marked as pseudo-variables, for example $DESCRIPTION
.
Here's an example of the program itself:
Manpage code can be seen here.
Outputs a XML dump that can be used for example in XML stylesheets.
XML page example is located here.
It is possible that the library versions used with Args2all are not compatible with the versions you're using in the classes you've compiled. To get around this problem, adjust the problematic library versions to be the same on both sides.
Copyright 2017 Stephan Fuhrmann
Licensed under the GNU GENERAL PUBLIC LICENSE 2.0. Please see the licensing conditions under LICENSE or at https://www.gnu.org/licenses/gpl-2.0.html.