update yaml format to use new message function

This commit is contained in:
Jonathan Wren 2022-05-01 03:41:37 -07:00
parent af220be35f
commit 7eb385d0bb

View file

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