bluesearch.entrypoint.database.parse module

Parsing articles.

init_parser(parser: argparse.ArgumentParser) argparse.ArgumentParser[source]

Initialise the argument parser for the parse subcommand.

Parameters

parser – The argument parser to initialise.

Returns

The initialised argument parser. The same object as the parser argument.

Return type

argparse.ArgumentParser

iter_parsers(input_type: str, input_path: pathlib.Path) Iterator[bluesearch.database.article.ArticleParser][source]

Return an iterator of initialized parsers for the given input.

run(*, input_type: str, input_path: Path | None, output_dir: Path, match_filename: str | None, recursive: bool, dry_run: bool) int[source]

Parse one or several articles.

Parameter description and potential defaults are documented inside of the get_parser function.