aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 0de89048..232bca1b 100644
--- a/cli/cli.py
+++ b/cli/cli.py
@@ -148,3 +148,8 @@ def touch(filename):
os.rename(fullpath, new_fullpath)
sys.stderr.write("%srenamed to %s%s\n" % (YELLOW, new_filename, RESET))
return 0
+
+
+def touch_cli(args):
+ """CLI wrapper around touch."""
+ touch(args.filename)
diff --git a/pyblog b/pyblog
index 3c574445..0eeb82b2 100755
--- a/pyblog
+++ b/pyblog
@@ -53,11 +53,6 @@ from generators import generators
from cli import cli
-def touch_cli(args):
- """CLI wrapper around touch."""
- cli.touch(args.filename)
-
-
def deploy(args):
"""Deploys build directory to origin/master without regenerating.
@@ -507,7 +502,7 @@ def main():
parser_new_post.add_argument("filename",
help="path or basename of the source file, "
"e.g., 2015-05-05-new-blog-new-start.md")
- parser_new_post.set_defaults(func=touch_cli)
+ parser_new_post.set_defaults(func=cli.touch_cli)
parser_generate = subparsers.add_parser(
"generate", aliases=["g", "gen"],