aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cli/cli.py5
-rwxr-xr-xpyblog7
2 files changed, 6 insertions, 6 deletions
diff --git a/cli/cli.py b/cli/cli.py
index 51b9925c..71491357 100644
--- a/cli/cli.py
+++ b/cli/cli.py
@@ -77,3 +77,8 @@ def new_post(title):
edit_post_with_editor(fullpath)
return 0
+
+
+def new_post_cli(args):
+ """CLI wrapper around new_post."""
+ new_post(args.title)
diff --git a/pyblog b/pyblog
index 08e0a1a1..a2adee02 100755
--- a/pyblog
+++ b/pyblog
@@ -53,11 +53,6 @@ from generators import generators
from cli import cli
-def new_post_cli(args):
- """CLI wrapper around new_post."""
- cli.new_post(args.title)
-
-
def touch(filename):
"""Update the timestamp of a post to the current time."""
filename = os.path.basename(filename)
@@ -559,7 +554,7 @@ def main():
"new_post", aliases=["n", "new"],
description="Create a new post with metadata pre-filled.")
parser_new_post.add_argument("title", help="title of the new post")
- parser_new_post.set_defaults(func=new_post_cli)
+ parser_new_post.set_defaults(func=cli.new_post_cli)
parser_new_post = subparsers.add_parser(
"touch", aliases=["t", "tou"],