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 2d6de2028f - Show all commits
+6
View File
@@ -30,9 +30,15 @@ def existing_directory(path: str) -> pathlib.Path:
raise argparse.ArgumentTypeError(f'{_path}: no such file or directory')
if not path.is_dir():
raise argparse.ArgumentTypeError(f'{_path}: not a directory')
return path
def main() -> int:
argument_parser = argparse.ArgumentParser()
argument_parser.add_argument('project_directory', type = existing_directory, nargs = '?', default = pathlib.Path('.'), help = 'The directory of the project')
argument_parser.add_argument('-o', '--output-dir', type = pathlib.Path, help = 'the output directory the documentation will be written to')
args = argument_parser.parse_args()
if args.output_dir is None:
args.output_dir = args.project_directory / 'docs/reference'
return 0