update welcome message to use new handling

This commit is contained in:
Jonathan Wren 2022-05-01 04:22:42 -07:00
parent cd464eebe0
commit f1119e1593
2 changed files with 20 additions and 17 deletions

View file

@ -24,6 +24,25 @@ class MsgText(Enum):
def __str__(self) -> str: def __str__(self) -> str:
return self.value return self.value
# -- Welcome --- #
WelcomeToJrnl = """
Welcome to jrnl {version}!
It looks like you've been using an older version of jrnl until now. That's
okay - jrnl will now upgrade your configuration and journal files. Afterwards
you can enjoy all of the great new features that come with jrnl 2:
- Support for storing your journal in multiple files
- Faster reading and writing for large journals
- New encryption back-end that makes installing jrnl much easier
- Tons of bug fixes
Please note that jrnl 1.x is NOT forward compatible with this version of jrnl.
If you choose to proceed, you will not be able to use your journals with
older versions of jrnl anymore.
"""
# --- Exceptions ---# # --- Exceptions ---#
UncaughtException = """ UncaughtException = """
{name} {name}

View file

@ -54,23 +54,7 @@ def check_exists(path):
def upgrade_jrnl(config_path): def upgrade_jrnl(config_path):
config = load_config(config_path) config = load_config(config_path)
print( print_msg(Message(MsgText.WelcomeToJrnl, MsgType.NORMAL, {"version": __version__}))
f"""Welcome to jrnl {__version__}.
It looks like you've been using an older version of jrnl until now. That's
okay - jrnl will now upgrade your configuration and journal files. Afterwards
you can enjoy all of the great new features that come with jrnl 2:
- Support for storing your journal in multiple files
- Faster reading and writing for large journals
- New encryption back-end that makes installing jrnl much easier
- Tons of bug fixes
Please note that jrnl 1.x is NOT forward compatible with this version of jrnl.
If you choose to proceed, you will not be able to use your journals with
older versions of jrnl anymore.
"""
)
encrypted_journals = {} encrypted_journals = {}
plain_journals = {} plain_journals = {}