diff --git a/jrnl/messages.py b/jrnl/messages.py index 0954f7d7..0ed2cc8a 100644 --- a/jrnl/messages.py +++ b/jrnl/messages.py @@ -24,6 +24,25 @@ class MsgText(Enum): def __str__(self) -> str: 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 ---# UncaughtException = """ {name} diff --git a/jrnl/upgrade.py b/jrnl/upgrade.py index e775eff9..ad0f4fa6 100644 --- a/jrnl/upgrade.py +++ b/jrnl/upgrade.py @@ -54,23 +54,7 @@ def check_exists(path): def upgrade_jrnl(config_path): config = load_config(config_path) - print( - 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. -""" - ) + print_msg(Message(MsgText.WelcomeToJrnl, MsgType.NORMAL, {"version": __version__})) encrypted_journals = {} plain_journals = {}