NASA - National Aeronautics and Space Administration

+ NASA Homepage
+ NASA en Español
+ Contact NASA
Go
Planetary Data System - Engineering Node Banner

Operation

The following topics can be found in this section:

Note: The command-line examples in this section have been broken into multiple lines for readability. The commands should be reassembled into a single line prior to execution.

Tool Setup

In order to execute the Generate Tool, the user's environment must first be configured appropriately. This section describes how to setup the user environment on UNIX-based and Windows machines.

UNIX-Based Setup

This section details the environment setup for UNIX-based machines. The preferred method is to specify the shell script, PDS4Generate, on the command-line. Setting the PATH environment variable to the location of the script, enables the shell script to be executed from any location on the user's machine.

The following command demonstrates how to set the PATH environment variable, by appending to its current setting:

% setenv PATH ${PATH}:$HOME/generate-0.1.0/bin
        

The tool can now be executed via the shell script as demonstrated in the following example:

% PDS4Generate <command-line arguments>
        

Additional methods for setting up a UNIX-based environment can be found in the UNIX Setup Options section. If viewing this document in PDF form, see the appendix for details.

Windows Setup

This section details the environment setup for Windows machines. The preferred method is to specify the batch file, PDS4Generate.bat, on the command-line. Setting the PATH environment variable to the location of the file, enables the batch file to be executed from any location on the user's machine.

The following command demonstrates how to set the PATH environment variable, by appending to its current setting:

C:\> set PATH = %PATH%;C:\generate-0.1.0\bin
        

The tool can now be executed via the batch file as demonstrated in the following example:

C:\> PDS4Generate <command-line arguments>
        

Additional methods for setting up a Windows environment can be found in the Windows Setup Options section. If viewing this document in PDF form, see the appendix for details.

Tool Execution

Generate Tool can be executed in various ways. This section describes how to run the tool, as well as its behaviors and caveats.

Command-Line Options

The following table describes the command-line options available:

Command-Line OptionDescription
-d, --debugDirects output to screen, not file.
-f, --file-listSpecify the path for a file containing a list of file paths for PDS3 Labels
-h, --helpDisplay usage.
-o, --output-fileSpecify an output filename. Default is PDS3 label name with _pds4 suffix.
-p, --pds3-labelSpecify the file path for the PDS3 Label to be converted to PDS4
-t, --templateSpecify the file path for the Velocity template for PDS3 -> PDS4 conversion
-V, --versionDisplay application version.

Execute Generate Tool

This section demonstrates execution of the tool using the command-line options. The examples below execute the tool via the batch/shell script. Alternate methods for executing the tool can be found in the Tool Setup section.

The following command demonstrates how to run the Generate Tool to convert from a PDS3 Label to a PDS4 Label using a Velocity template file and output to standard out:

% PDS4Generate -d -p <pds3-label-path> -t <velocity-template-path>
        

The following command demonstrates how to run the Generate Tool to convert from a PDS3 Label to a PDS4 Label using a Velocity template file and output to a file:

% PDS4Generate -p <pds3-label-path> -t <velocity-template-path>
        

The output would go into a file <pds3-label-path>_pd4


FirstGov Logo
+ Freedom of Information Act
+ NASA 2003 Strategic Plan
+ NASA Privacy Statement, Disclaimer, and
   Accessiblity Certification

+ Copyright/Image Use Policy
NASA Logo
Curator: Emily.S.Law
Webmaster: Maryia Sauchanka-Davis
NASA Official: William Knopf
Last Updated:
+ Comments and Questions