From a23035ce18be8a6c32ac312087f17beed4f84625 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Mon, 18 Sep 2023 07:58:43 +0200 Subject: [PATCH] added(py): command to edit settings --- cli/app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/app.py b/cli/app.py index ec65887..43f52bd 100644 --- a/cli/app.py +++ b/cli/app.py @@ -107,6 +107,8 @@ while not (command == "quit" or command == "exit" or command == "q"): elif command[0:7] == "export ": action = "export" command = command[7:] + elif command == "settings": + action = "settings" try: index = int(command) @@ -130,6 +132,9 @@ while not (command == "quit" or command == "exit" or command == "q"): elif action == "export": if note: writetextfile("data/" + note["title"] + ".md", note["content"]) + elif action == "settings": + subprocess.call(settings["commands"]["editor"] + ["settings.json"]) + settings = json.loads(readtextfile("settings.json")) elif note and not action == "grep": editnote(note) else: