mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
[CLI] colour code 'no editor' error message
This commit is contained in:
parent
db4a5a4665
commit
cf7b5d95eb
2 changed files with 1 additions and 4 deletions
|
@ -252,7 +252,7 @@ def run(manual_args=None):
|
|||
|
||||
elif args.edit:
|
||||
if not config['editor']:
|
||||
util.prompt("[You need to specify an editor in {0} to use the --edit function.]".format(install.CONFIG_FILE_PATH))
|
||||
util.prompt("[{1}ERROR{2}: You need to specify an editor in {0} to use the --edit function.]".format(install.CONFIG_FILE_PATH, "\033[31m", "\033[0m"))
|
||||
sys.exit(1)
|
||||
other_entries = [e for e in old_entries if e not in journal.entries]
|
||||
# Edit
|
||||
|
|
|
@ -5,7 +5,6 @@ from __future__ import absolute_import, unicode_literals, print_function
|
|||
from .text_exporter import TextExporter
|
||||
import re
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
|
||||
class YAMLExporter(TextExporter):
|
||||
|
@ -59,8 +58,6 @@ class YAMLExporter(TextExporter):
|
|||
if warn_on_heading_level is True:
|
||||
print("{}WARNING{}: Headings increased past H6 on export - {} {}".format("\033[33m", "\033[0m", date_str, entry.title), file=sys.stderr)
|
||||
|
||||
# top = yaml.dump(entry)
|
||||
|
||||
return "title: {title}\ndate: {date}\nstared: {stared}\ntags: {tags}\n{body} {space}".format(
|
||||
date=date_str,
|
||||
title=entry.title,
|
||||
|
|
Loading…
Add table
Reference in a new issue