igpp.docgen is a tool to parse structured information (metadata) and merge the information with an Apache Velocity template
A Velocity template contains text and references to variables. The pds.docgen executable is used to defined the value assigned to variables. Variables can be defined on the command line, read from a PDS3 label or from a text file. Variables are placed into one or more named contexts. When loading varaibles from a file the context name can be choosen. Variables from the command line are placed in a context named "options". The syntax for specifying a named context that is populated from a file is:
The extension on the file name is used to determined how to parse the file. Supported extensions are:
The format determined by the filename extension can be overriden with a "format" designator prefix in the context options. Supported format designators are:
Usage: java igpp.docgen.Process [options] [file...]
Options:
-f,--format | Format. Format output with a given style. Allowed values are PDS3 and XML. Default: XML |
-h,--help | Dispay this text |
-i,--include | Include Path. Path to look for files referenced with an INCLUDE or STRUCTURE pointer. |
-l,--list | List. Parse file as though it is in list format. With the list format values are expressed as keyword=value, one per line. |
-o,--output | Output. Output generated document to {file}. Default: System.out. |
-s,--separator | Separator. Pattern that separates values in tabular files. Default: is a tab () |
-t,--template | Template. The template folder to search for templates file. |
-v,--verbose | Verbose. Show status at each step. |
Command-line Variables
Variables can be defined on the command-line using the syntax:
name=value
The name and value for each variable is placed in the "options" context.
Shell scripts to run the tool are in the "bin" directory in the distribution. You can run the tool on a Linux system with the command:
% docgen
% docgen.bat