20250119.1737294734
This commit is contained in:
parent
8c4e07134c
commit
177ed7f0f1
1 changed files with 6 additions and 4 deletions
|
@ -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}"
|
||||
|
|
Loading…
Add table
Reference in a new issue