From 177ed7f0f1bd8390388ed89302e4846311c86dcf Mon Sep 17 00:00:00 2001 From: fz0x1 Date: Sun, 19 Jan 2025 14:52:14 +0100 Subject: [PATCH] 20250119.1737294734 --- global/scripts/bin/diary.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/global/scripts/bin/diary.py b/global/scripts/bin/diary.py index b355ee7..585d399 100755 --- a/global/scripts/bin/diary.py +++ b/global/scripts/bin/diary.py @@ -471,14 +471,15 @@ def insert(): print("There is no text") sys.exit(1) try: - result = subprocess.run( + subprocess.run( f'printf "%s %s" "{convert_diary_date(datenow_timestamp)}" {content} | jrnl {diary_name}', shell=True, capture_output=True, text=True, check=True, ) - print(result.stdout) + os.system("clear") + print("Record has been inserted.") except subprocess.CalledProcessError as e: print(f"Error inserting single entry: {e.stderr}") raise @@ -497,14 +498,15 @@ def insert(): content = shlex.quote(file.read()) if hash != make_hash(temp_file_path): try: - result = subprocess.run( + subprocess.run( f'printf "%s %s" "{convert_diary_date(datenow_timestamp)}" {content} | jrnl {diary_name}', shell=True, capture_output=True, text=True, check=True, ) - print(result.stdout) + os.system("clear") + print("Record has been inserted.") except subprocess.CalledProcessError as e: print( f"Error during bulk import: {e.stderr}, file: {temp_file_path}"