diff options
author | Florian Dold <florian@dold.me> | 2021-05-06 16:01:32 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-05-06 16:01:44 +0200 |
commit | 9a6e7c57484e16bdd3f4aa917e6489048fb242d0 (patch) | |
tree | e87fd94803e83e5269add3de88b1b06fa97b9ef1 /make_site.py | |
parent | c32cf6705b2519b670c22bb0d6378b3dbca9f508 (diff) | |
download | www-9a6e7c57484e16bdd3f4aa917e6489048fb242d0.tar.gz www-9a6e7c57484e16bdd3f4aa917e6489048fb242d0.tar.bz2 www-9a6e7c57484e16bdd3f4aa917e6489048fb242d0.zip |
simplify structure
Diffstat (limited to 'make_site.py')
-rwxr-xr-x | make_site.py | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/make_site.py b/make_site.py index 33978447..95a114de 100755 --- a/make_site.py +++ b/make_site.py @@ -29,36 +29,13 @@ env = jinja2.Environment(loader=jinja2.FileSystemLoader(str(PurePath(__file__).p autoescape=False) env.newstyle_gettext = True -if len(sys.argv) >= 2 and sys.argv[1] == "-vv": - DEBUG=1 -elif len(sys.argv) >= 2 and sys.argv[1] == "-vvv": - DEBUG=2 -elif len(sys.argv) >= 2 and sys.argv[1] == "-vvvv": - DEBUG=3 -else: - DEBUG=0 - def main(): - x = gen_site(DEBUG) + x = gen_site(0) conf = x.load_config("www.yml") x.gen_abstract(conf, "newsposts", "abstract", "page", 1000) x.gen_newspost_content(conf, "newsposts", "content", "page", "en") x.gen_rss("inc", conf, env) - if DEBUG: - print("generating html from jinja2 templates...") x.run("template", conf, env) - if DEBUG >= 2: - print(Path.cwd()) - _ = Path("rendered") - for child in _.iterdir(): - print(child) - if DEBUG >= 2: - print(Path.cwd()) - if DEBUG: - print("generating html from jinja2 news templates...") - x.run("news", conf, env) - if DEBUG: - print("copying directories...") x.copy_trees("static") x.copy_trees("dist") |