Feat(cli): add base command-line interface #16

Merged
jakob.scheid merged 21 commits from feature/cli into main 2026-09-13 20:11:00 +02:00
Showing only changes of commit 60a097f0cc - Show all commits
+2 -2
View File
1
@@ -35,7 +35,7 @@ def existing_directory(path: str) -> pathlib.Path:
raise argparse.ArgumentTypeError(f'{_path}: not a directory') raise argparse.ArgumentTypeError(f'{_path}: not a directory')
return path return path
def main() -> int: def main(argv = None) -> int:
common_parser = argparse.ArgumentParser(add_help = False) common_parser = argparse.ArgumentParser(add_help = False)
common_parser.add_argument( common_parser.add_argument(
'project_directory', 'project_directory',
@@ -88,7 +88,7 @@ def main() -> int:
help = 'indicates whether Markdown tables are allowed in the documentation. By default, Markdown tables are disabled. Warning: Markdown tables are not CommonMark.' help = 'indicates whether Markdown tables are allowed in the documentation. By default, Markdown tables are disabled. Warning: Markdown tables are not CommonMark.'
) )
args = argument_parser.parse_args() args = argument_parser.parse_args(argv)
if args.output_dir is None: if args.output_dir is None:
args.output_dir = args.project_directory / 'docs/reference' args.output_dir = args.project_directory / 'docs/reference'