castep_outputs.cli.castep_outputs_main#
Main castep parser access routines.
Functions
|
Run the main program from command line. |
|
Parse all files in files dict. |
|
Parse a file using the given parser and post-process according to options. |
- castep_outputs.cli.castep_outputs_main.main()[source]#
Run the main program from command line.
- Return type:
- castep_outputs.cli.castep_outputs_main.parse_all(output=None, out_format='json', *, loglevel=30, testing=False, **files)[source]#
Parse all files in files dict.
- Parameters:
output (
Union[str,Path,TextIO,None]) – Filepath or handle to dump output to.out_format (
Literal['json','pprint','print','ruamel','yaml']) – Format to dump as.loglevel (
int) – Logging level.testing (
bool) – Whether used for test suite (disable processing fragile properties).**files (
Sequence[Path]) – Dictionary of {parser needed: Sequence of paths to parse}.
- Return type:
- castep_outputs.cli.castep_outputs_main.parse_single(in_file, parser=None, out_format='print', *, loglevel=30, testing=False)[source]#
Parse a file using the given parser and post-process according to options.
- Parameters:
parser (
Optional[Callable[[TextIO],list[dict[str,Any]]]]) – Castep parser to use. If None will be determined from extension.out_format (
Literal['json','pprint','print','ruamel','yaml']) – Format to dump as.loglevel (
int) – Logging level.testing (
bool) – Whether used for test suite (disable processing fragile properties).
- Returns:
Parsed data.
- Return type:
- Raises:
ValueError – If invalid parser provided.