diff options
| author | Christoph Schlosser <christoph@linux.com> | 2025-08-23 22:40:20 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christoph@linux.com> | 2025-08-23 22:40:20 +0200 |
| commit | e4ba1fc772b2ed50fb5f7b469fa30b8915479416 (patch) | |
| tree | 7a531adee09d8e7b8c227b32baa285db0de9a763 /g2h/cli.py | |
| parent | 2f102e4036c3a49e5d40883fa4ef59193c9d943c (diff) | |
| download | git2hugo-e4ba1fc772b2ed50fb5f7b469fa30b8915479416.tar.gz | |
g2h: Add jinja and git basic flow
Diffstat (limited to 'g2h/cli.py')
| -rw-r--r-- | g2h/cli.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,16 +1,21 @@ import argparse +from .git import Git +from .gen import Generator def parse_args(): parser = argparse.ArgumentParser( prog='g2h', description='Convert a git repository into markdown files Hugo can understand.') - parser.add_argument('repo-path', help='Path to the root of git repository') - parser.add_argument('out-dir', help='Path to where the generated files should be stored') + parser.add_argument('repo_path', help='Path to the root of git repository') + parser.add_argument('out_dir', help='Path to where the generated files should be stored') return parser.parse_args() def main(): args = parse_args() + git = Git(args.repo_path) + gen = Generator(args.out_dir) + gen.render_overview(git.get_all_commits()) if __name__ == '__main__': main() |