diff --git a/.gitignore b/.gitignore index e24938c0..e61da393 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,9 @@ Icon # Documentation _build + +# MS Visual Studio (PyTools) +obj +*.pyproj +*.sln +*.suo diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4c240d8..ef1125fc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ Contributing ============ -If you use jrnl, you can totally make my day by just saying "thanks for the code" or by [tweeting about jrnl](https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fmaebert.github.io%2Fjrnl&via=maebert). It's your change to make a programmer happy today! If you have a minute or two, let me know what you use jrnl for and how, it'll help me to make it even better. If you blog about jrnl, I'll send you a post-card! +If you use jrnl, you can totally make my day by just saying "thanks for the code" or by [tweeting about jrnl](https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fmaebert.github.io%2Fjrnl&via=maebert). It's your chance to make a programmer happy today! If you have a minute or two, let me know what you use jrnl for and how, it'll help me to make it even better. If you blog about jrnl, I'll send you a post-card! Bugs 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/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: