aboutsummaryrefslogtreecommitdiff
path: root/cli/cli.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cli/cli.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/cli.py b/cli/cli.py
index ed2680f4..d5caf15f 100644
--- a/cli/cli.py
+++ b/cli/cli.py
@@ -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