aboutsummaryrefslogtreecommitdiff
path: root/pyblog
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-05-26 16:26:24 +0200
committerneodarz <neodarz@neodarz.net>2019-05-26 16:26:50 +0200
commit6f36091aa8bf5d4ae446346a945c6217c2493e97 (patch)
tree2da98fb2e383bced7e992736b734334b5aa2e647 /pyblog
parent75dc923f207cccfe4439f46792e624c9c5c230bd (diff)
downloadmy_new_personal_website-6f36091aa8bf5d4ae446346a945c6217c2493e97.tar.xz
my_new_personal_website-6f36091aa8bf5d4ae446346a945c6217c2493e97.zip
Move regenerate to external file
Diffstat (limited to 'pyblog')
-rwxr-xr-xpyblog8
1 files changed, 1 insertions, 7 deletions
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"],