lunapi.cli¶
Command-line interface for the common Luna sample-list workflow.
This module deliberately contains only the command-line adapter. Luna
options, parameter files, sample-list loading, EDF attachment, command
evaluation, and output writing continue to be handled by the existing
lunapi/C++ APIs.
Attributes¶
Exceptions¶
A user-facing command-line parsing or usage error. |
Classes¶
An option to apply through the existing Luna API. |
|
Parsed configuration for the ordinary Luna CLI workflow. |
Functions¶
|
Parse the supported Luna command-line grammar without side effects. |
|
Run the |
Module Contents¶
- lunapi.cli.HELP = Multiline-String[source]¶
Show Value
"""Usage: luna.py SAMPLE_LIST [options] [LUNA_VARIABLES...] -s "COMMANDS" luna.py EDF [options] [LUNA_VARIABLES...] -s "COMMANDS" luna.py SAMPLE_LIST [options] < command-file Common examples: luna.py s.lst -o out.db sig=EEG @params.txt -s "EPOCH len=30 PSD" luna.py s.lst 1 10 -o out.db -s "HEADERS" luna.py s.lst subject_001 -o out.db -s "DESC" luna.py --build /data/study > s.lst luna.py --validate s.lst Supported interface: Input SAMPLE_LIST Tab-delimited ID / EDF / annotation sample list EDF Process one EDF/EDFZ/REC/SEDF recording Output -o FILE Write one SQLite result database (overwrites it) -t DIRECTORY Write Luna plain-text tables to a directory Commands -s COMMANDS Evaluate the remainder of the command line stdin If -s is omitted, read a command file from stdin Luna variables key=value Set a Luna special variable or option @PARAM_FILE Read a Luna parameter file Sample selection N Select sample-list row N (1-based) N-M Select an inclusive row range N/M Select the Luna slice N of M ID Select a sample-list ID; repeat for multiple IDs Supported helper modes --build PATH... Build a sample list using Luna's C++ builder --validate SAMPLE_LIST Validate EDF paths in a sample list --version Show lunapi and Luna versions -h, --help Show this help Not currently implemented by this interface: -a/--append and Luna's standalone special tools such as --xml, --merge, --repath, --gpa, --psc, --pops, and signal/filter design helpers. Use the native luna executable for those workflows. """
- exception lunapi.cli.CLIError[source]¶
Bases:
ValueErrorA user-facing command-line parsing or usage error.
- class lunapi.cli.CLIConfig[source]¶
Parsed configuration for the ordinary Luna CLI workflow.
- parameters: list[ParameterAction] = [][source]¶