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}"