diff options
author | neodarz <neodarz@neodarz.net> | 2019-05-26 16:26:24 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-05-26 16:26:50 +0200 |
commit | 6f36091aa8bf5d4ae446346a945c6217c2493e97 (patch) | |
tree | 2da98fb2e383bced7e992736b734334b5aa2e647 | |
parent | 75dc923f207cccfe4439f46792e624c9c5c230bd (diff) | |
download | my_new_personal_website-6f36091aa8bf5d4ae446346a945c6217c2493e97.tar.xz my_new_personal_website-6f36091aa8bf5d4ae446346a945c6217c2493e97.zip |
Move regenerate to external file
-rw-r--r-- | cli/cli.py | 6 | ||||
-rwxr-xr-x | pyblog | 8 |
2 files changed, 7 insertions, 7 deletions
@@ -7,3 +7,9 @@ def generate(args): """Wrapper for generate_blog(fresh=False).""" # pylint: disable=unused-argument exit(generators.generate_blog(fresh=False)) + + +def regenerate(args): + """Wrapper for generate_blog(fresh=True).""" + # pylint: disable=unused-argument + exit(generators.generate_blog(fresh=True)) @@ -53,12 +53,6 @@ from generators import generators from cli import cli -def regenerate(args): - """Wrapper for generate_blog(fresh=True).""" - # pylint: disable=unused-argument - exit(generators.generate_blog(fresh=True)) - - def sanitize(string): """Sanitize string (title) for URI consumption.""" if isinstance(string, bytes): @@ -659,7 +653,7 @@ def main(): parser_regenerate = subparsers.add_parser( "regenerate", aliases=["r", "regen"], description="Regenerate the entire blog afresh.") - parser_regenerate.set_defaults(func=regenerate) + parser_regenerate.set_defaults(func=cli.regenerate) parser_new_post = subparsers.add_parser( "preview", aliases=["p", "pre"], |