summaryrefslogtreecommitdiffstats
path: root/g2h/cli.py
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-08-24 17:10:11 +0200
committerChristoph Schlosser <christoph@linux.com>2025-08-24 17:10:11 +0200
commit9bd3fd1bce788dce610ad7276ce1f1634019c380 (patch)
tree59898b74445bf4a9e751b4b7bec46f85a7ad43d8 /g2h/cli.py
parent66dfe0e665ebeb0dce1ff290b77245e4a9fadd88 (diff)
downloadgit2hugo-9bd3fd1bce788dce610ad7276ce1f1634019c380.tar.gz
g2h: Add unit tests and restructure class layout
Instead of having a large generator class use individual pages
Diffstat (limited to 'g2h/cli.py')
-rw-r--r--g2h/cli.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/g2h/cli.py b/g2h/cli.py
index fc14582..3beaeb2 100644
--- a/g2h/cli.py
+++ b/g2h/cli.py
@@ -2,7 +2,7 @@ import argparse
import os
from .git import Git
-from .gen import Generator
+from .page_factory import PageFactory
def parse_args():
parser = argparse.ArgumentParser(
@@ -25,9 +25,9 @@ def main():
project_name = args.name if args.name is not None else os.path.basename(args.repo_path)
tags = git.get_tags()
- gen = Generator(args.out_dir)
- gen.render_overview(project_name, branches, tags)
- gen.render_log(project_name, commits, branches, tags)
+ factory = PageFactory(args.out_dir, project_name)
+ factory.new_overview(branches, tags).render()
+ factory.new_log(commits, branches, tags).render()
if __name__ == '__main__':
main()