mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
update yaml format to use new message function
This commit is contained in:
parent
af220be35f
commit
7eb385d0bb
1 changed files with 7 additions and 5 deletions
|
@ -12,6 +12,7 @@ from jrnl.exception import JrnlException
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgText
|
from jrnl.messages import MsgText
|
||||||
from jrnl.messages import MsgType
|
from jrnl.messages import MsgType
|
||||||
|
from jrnl.output import print_msg
|
||||||
|
|
||||||
|
|
||||||
class YAMLExporter(TextExporter):
|
class YAMLExporter(TextExporter):
|
||||||
|
@ -79,11 +80,12 @@ class YAMLExporter(TextExporter):
|
||||||
spacebody = spacebody + "\t" + line
|
spacebody = spacebody + "\t" + line
|
||||||
|
|
||||||
if warn_on_heading_level is True:
|
if warn_on_heading_level is True:
|
||||||
print(
|
print_msg(
|
||||||
"{}WARNING{}: Headings increased past H6 on export - {} {}".format(
|
Message(
|
||||||
WARNING_COLOR, RESET_COLOR, date_str, entry.title
|
MsgText.HeadingsPastH6,
|
||||||
),
|
MsgType.WARNING,
|
||||||
file=sys.stderr,
|
{"date": date_str, "title": entry.title},
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
dayone_attributes = ""
|
dayone_attributes = ""
|
||||||
|
|
Loading…
Add table
Reference in a new issue