20250119.1737294734

This commit is contained in:
fz0x1 2025-01-19 14:52:14 +01:00
parent 8c4e07134c
commit 177ed7f0f1

View file

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