mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 03:28:31 +02:00
Suppress "Entry added to default journal" message if using default journal
This commit is contained in:
parent
8948334d5d
commit
ee762b53bd
1 changed files with 8 additions and 6 deletions
14
jrnl/jrnl.py
14
jrnl/jrnl.py
|
@ -7,6 +7,7 @@ import sys
|
||||||
from jrnl import install
|
from jrnl import install
|
||||||
from jrnl import plugins
|
from jrnl import plugins
|
||||||
from jrnl import time
|
from jrnl import time
|
||||||
|
from jrnl.config import DEFAULT_JOURNAL_KEY
|
||||||
from jrnl.config import get_config_path
|
from jrnl.config import get_config_path
|
||||||
from jrnl.config import get_journal_name
|
from jrnl.config import get_journal_name
|
||||||
from jrnl.config import scope_config
|
from jrnl.config import scope_config
|
||||||
|
@ -146,13 +147,14 @@ def write_mode(args, config, journal, **kwargs):
|
||||||
'Write mode: appending raw text to journal "%s": %s', args.journal_name, raw
|
'Write mode: appending raw text to journal "%s": %s', args.journal_name, raw
|
||||||
)
|
)
|
||||||
journal.new_entry(raw)
|
journal.new_entry(raw)
|
||||||
print_msg(
|
if args.journal_name != DEFAULT_JOURNAL_KEY:
|
||||||
Message(
|
print_msg(
|
||||||
MsgText.JournalEntryAdded,
|
Message(
|
||||||
MsgStyle.NORMAL,
|
MsgText.JournalEntryAdded,
|
||||||
{"journal_name": args.journal_name},
|
MsgStyle.NORMAL,
|
||||||
|
{"journal_name": args.journal_name},
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
journal.write()
|
journal.write()
|
||||||
logging.debug("Write mode: completed journal.write()")
|
logging.debug("Write mode: completed journal.write()")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue