aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/cli.py6
-rwxr-xr-xpyblog8
2 files changed, 7 insertions, 7 deletions
diff --git a/cli/cli.py b/cli/cli.py
index ad081fb7..33bd1422 100644
--- a/cli/cli.py
+++ b/cli/cli.py
@@ -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))
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"],