CLI reference
All commands are available through the glidertest entry point (or python -m glidertest).
Run glidertest <command> --help for the full flag list at any time.
Exit status, every command: 0 success; 1 one or more input files failed (the rest were still written, each failure one line on stderr); 2 usage error.
Typical workflow:
glidertest report mission.nc --report-dir reports/ one mission -> reports/<id>/, fleet page rebuilt
glidertest report data/ --report-dir reports/ every *.nc in data/, fleet page rebuilt once
glidertest report mission.nc -o out/ one mission's pages directly in out/, no fleet page
glidertest navigator reports/ re-index after adding or removing missions
glidertest report
Write an HTML mission report for each OG1 netCDF file: a landing page, one page per sensor
present, a flight page when the data supports it, an inventory page, and a report.json
manifest. The dataset is read, never modified.
usage: glidertest report [-h] [--mission-id NAME] [--title TEXT]
[--no-navigator] [--skip-existing] [--pattern GLOB]
[-n] (--report-dir ROOT | -o DIR)
FILE [FILE ...]
Positional Arguments
- FILE
OG1 netCDF file(s), or directories of them (see –pattern).
Named Arguments
- --mission-id
Subdirectory name for the mission, instead of the file’s OG1 id (or its file stem when the id is missing). Single FILE, –report-dir only (not with -o).
- --title
Title for the fleet page’s masthead (default: the ROOT directory name). Ignored with –no-navigator or -o.
- --no-navigator
Do not rebuild ROOT/index.html after writing the mission(s).
Default:
False- --skip-existing
Skip a FILE whose mission already has a ROOT/<mission_id>/report.json.
Default:
False- --pattern
Filename glob applied inside each directory given as FILE (default: ‘*.nc’; not recursive).
Default:
'*.nc'- -n, --dry-run
Print what would be written without writing anything.
Default:
False
output location (one is required)
- --report-dir
Central directory for all mission reports. Each mission’s pages are written to ROOT/<mission_id>/ and ROOT/index.html is the fleet page, making the whole report tree portable.
- -o, --output-dir
Directory for one mission’s pages, written directly into DIR (no <mission_id>/ subdirectory, no fleet page). Single FILE only.
- Examples:
# One mission into a report tree; the fleet page is rebuilt afterwards: glidertest report sea045_20230604T1253_delayed.nc –report-dir reports/
# A directory of missions; the fleet page is rebuilt once at the end: glidertest report data/ –report-dir reports/
# Name the subdirectory yourself when the file has no usable OG1 id: glidertest report odd_file.nc –report-dir reports/ –mission-id sea045_2023_leg2
# Re-run over a folder, reporting only missions not yet in the tree: glidertest report data/ –report-dir reports/ –skip-existing
# One mission’s pages straight into a folder, no tree and no fleet page: glidertest report sea045_20230604T1253_delayed.nc -o sea045_report/
Exit status: 0 all files reported; 1 one or more files failed (the rest were still written, each failure one line on stderr); 2 usage error.
Examples:
# One mission into a report tree; the fleet page is rebuilt afterwards:
glidertest report sea045_20230604T1253_delayed.nc --report-dir reports/
# A directory of missions; the fleet page is rebuilt once at the end:
glidertest report data/ --report-dir reports/
# Name the subdirectory yourself when the file has no usable OG1 id:
glidertest report odd_file.nc --report-dir reports/ --mission-id sea045_2023_leg2
# Re-run over a folder, reporting only missions not yet in the tree:
glidertest report data/ --report-dir reports/ --skip-existing
# One mission's pages straight into a folder, no tree and no fleet page:
glidertest report sea045_20230604T1253_delayed.nc -o sea045_report/
Notes:
FILEmay be a directory;--pattern(default*.nc) selects files inside it, not recursively. A wildcard the shell did not expand (Windows) is expanded by glidertest.Two files with the same OG1
idwould write to the sameROOT/<id>/; the run refuses before writing anything and names both files. Use--mission-idon one of them.--report-dirwrites a portable tree ofROOT/<id>/with its ownindex.html;-oputs one mission’s pages directly into a single directory.