diff --git a/jrnl/Journal.py b/jrnl/Journal.py index f9122892..41d7a225 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -134,7 +134,7 @@ class Journal(object): line = line.strip() new_date = datetime.strptime(line[:date_length], self.config['timeformat']) - # parsing successfull => save old entry and create new one + # parsing successful => save old entry and create new one if new_date and current_entry: entries.append(current_entry) diff --git a/jrnl/cli.pyc b/jrnl/cli.pyc new file mode 100644 index 00000000..f24ccbff Binary files /dev/null and b/jrnl/cli.pyc differ diff --git a/jrnl/install.py b/jrnl/install.py index cd1683d9..7a6fa5c4 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -31,13 +31,13 @@ default_config = { 'timeformat': "%Y-%m-%d %H:%M", 'tagsymbols': '@', 'highlight': True, - 'linewrap': 80, + 'linewrap': 79, } def upgrade_config(config, config_path=os.path.expanduser("~/.jrnl_conf")): """Checks if there are keys missing in a given config dict, and if so, updates the config file accordingly. - This essentially automatically ports jrnl installations if new config parameters are introduced in later + This essentially automatically ports jrnl installations if new config parameters are introduced in later versions.""" missing_keys = set(default_config).difference(config) if missing_keys: diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 96ac97b3..451ddbdc 100755 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -156,6 +156,13 @@ def cli(manual_args=None): else: journal = Journal.Journal(journal_name, **config) + if "win32" in sys.platform: + # for Windows systems + _exit_multiline_code = "on a blank line, press Ctrl+Z and then Enter" + else: + # for *nix systems (and others?) + _exit_multiline_code = "press Ctrl+D" + if mode_compose and not args.text: if not sys.stdin.isatty(): # Piping data into jrnl @@ -163,7 +170,7 @@ def cli(manual_args=None): elif config['editor']: raw = get_text_from_editor(config) else: - raw = util.py23_read("[Compose Entry, press Ctrl+D to finish writing]\n") + raw = util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n") if raw: args.text = [raw] else: