mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Merge a6d413a2d8
into 2af05e4008
This commit is contained in:
commit
302f033252
3 changed files with 405 additions and 430 deletions
|
@ -89,6 +89,7 @@ def get_default_config() -> dict[str, Any]:
|
||||||
"tags": "none",
|
"tags": "none",
|
||||||
"title": "none",
|
"title": "none",
|
||||||
},
|
},
|
||||||
|
"output_new_entry": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import datetime
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
from jrnl import time
|
from jrnl import time
|
||||||
from jrnl.config import validate_journal_name
|
from jrnl.config import validate_journal_name
|
||||||
|
@ -378,6 +379,10 @@ class Journal:
|
||||||
self.entries.append(entry)
|
self.entries.append(entry)
|
||||||
if sort:
|
if sort:
|
||||||
self.sort()
|
self.sort()
|
||||||
|
|
||||||
|
if self.config["output_new_entry"]:
|
||||||
|
sys.stdout.write(entry.pprint())
|
||||||
|
sys.stdout.write("\n")
|
||||||
return entry
|
return entry
|
||||||
|
|
||||||
def editable_str(self) -> str:
|
def editable_str(self) -> str:
|
||||||
|
|
829
poetry.lock
generated
829
poetry.lock
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue