datakiln.arguments module

Options that the commands share, and the log they write.

datakiln.arguments.add_directory(parser: ArgumentParser)[source]

Adds the directory of the dataset, which every command takes.

Parameters:

parser (argparse.ArgumentParser) – Parser of a command.

datakiln.arguments.add_log(parser: ArgumentParser)[source]

Adds the option to show the log, which commands write to a file.

Parameters:

parser (argparse.ArgumentParser) – Parser of a command.

datakiln.arguments.add_include(parser: ArgumentParser, what: str)[source]

Adds the option that limits a command to some of the things it works on.

Parameters:
  • parser (argparse.ArgumentParser) – Parser of a command.

  • what (str) – What the command does with the names, as a sentence.

datakiln.arguments.add_export(parser: ArgumentParser)[source]

Adds the options that tell what a command that reads from a source writes to the dataset.

Parameters:

parser (argparse.ArgumentParser) – Parser of a command.

datakiln.arguments.setup_logging(stdout: bool, log_file: str)[source]

Sets up logging for a command.

Parameters:
  • stdout (bool) – Whether to output logs to standard output.

  • log_file (str) – Path to the log file.