Merge pull request #110 from MinchinWeb/help-windows

Help windows
This commit is contained in:
Manuel Ebert 2013-11-28 19:02:49 -08:00
commit 5bc18a5307
5 changed files with 18 additions and 5 deletions

6
.gitignore vendored
View file

@ -26,3 +26,9 @@ Icon
# Documentation
_build
# MS Visual Studio (PyTools)
obj
*.pyproj
*.sln
*.suo

View file

@ -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

View file

@ -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)

View file

@ -31,7 +31,7 @@ default_config = {
'timeformat': "%Y-%m-%d %H:%M",
'tagsymbols': '@',
'highlight': True,
'linewrap': 80,
'linewrap': 79,
}

View file

@ -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: