From 6f36091aa8bf5d4ae446346a945c6217c2493e97 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sun, 26 May 2019 16:26:24 +0200 Subject: Move regenerate to external file --- pyblog | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'pyblog') diff --git a/pyblog b/pyblog index ace987ae..11c969c5 100755 --- a/pyblog +++ b/pyblog @@ -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"], -- cgit v1.2.1