diff options
author | neodarz <neodarz@neodarz.net> | 2019-05-26 18:16:49 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-05-26 18:16:49 +0200 |
commit | 04688cd6ff58d09c950ae9791a7d2a6bc066704a (patch) | |
tree | 049521eea47429e956ff840f2f31ab4c3c6cfe92 /cli | |
parent | 8ae8db0798f9572b07f05b8a0120470a5417acab (diff) | |
download | my_new_personal_website-04688cd6ff58d09c950ae9791a7d2a6bc066704a.tar.xz my_new_personal_website-04688cd6ff58d09c950ae9791a7d2a6bc066704a.zip |
Move edit_existing_post to external file
Diffstat (limited to '')
-rw-r--r-- | cli/cli.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -13,6 +13,8 @@ import time import signal +import blessed + from config.config import * from utils import utils @@ -355,3 +357,13 @@ def preview(args): sys.stderr.write("\nSIGINT received, cleaning up...\n") server_process.join() return 0 + + +def edit_existing_post(args): + selector = utils.PostSelector(blessed.Terminal(), utils.list_posts()) + selection = selector.select() + if selection: + print(selection) + edit_post_with_editor(selection) + else: + return 1 |