From 12e05d77288c39f262322eaee36faf3d0b31c781 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sun, 26 May 2019 16:40:34 +0200 Subject: Move new_post_cli to external file --- pyblog | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'pyblog') 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"], -- cgit v1.2.1