Compare commits

...

7 commits

Author SHA1 Message Date
Manuel Ebert
17b439eba4 version bump 2014-09-30 10:17:07 -07:00
Manuel Ebert
c8e5d1ff34 util fixes 2014-09-30 10:16:50 -07:00
Manuel Ebert
bd6edffc81 Merge pull request #283 from pcarranza/ontoday
Fixed "-on today" option inclusive date parsing
2014-09-25 12:35:17 -07:00
Pablo Carranza
e9f691e399 Fixed -on today option parsing 2014-09-25 10:04:17 -04:00
Manuel Ebert
05e63dc76a Merge pull request #278 from pcarranza/master
Added how to ignore history appending for zsh
2014-09-22 12:16:16 -07:00
Pablo Carranza
c81f0e0c1d Added how to ignore history appending for zsh 2014-09-22 07:42:00 -04:00
Manuel Ebert
afcccb78c1 Fix docs typo 2014-09-17 08:35:39 -07:00
5 changed files with 17 additions and 5 deletions

View file

@ -4,6 +4,7 @@ Changelog
### 1.9 (July 21, 2014)
* __1.9.6__ Fuzzy time parsing improvements (thanks to @pcarranza)
* __1.9.5__ Multi-word tags for DayOne Journals
* __1.9.4__ Fixed: Order of journal entries in file correct after --edit'ing
* __1.9.3__ Fixed: Tags at the beginning of lines

View file

@ -30,7 +30,12 @@ A note on security
While jrnl follows best practises, true security is an illusion. Specifically, jrnl will leave traces in your memory and your shell history -- it's meant to keep journals secure in transit, for example when storing it on an `untrusted <http://techcrunch.com/2014/04/09/condoleezza-rice-joins-dropboxs-board/>`_ services such as Dropbox. If you're concerned about security, disable history logging for journal in your ``.bashrc`` ::
HISTINGNORE="jrnl *"
HISTIGNORE="jrnl *"
If you are using zsh instead of bash, you can get the same behaviour adding this to your ``zshrc`` ::
setopt HIST_IGNORE_SPACE
alias jrnl=" jrnl"
Manual decryption
-----------------

View file

@ -8,7 +8,7 @@ jrnl is a simple journal application for your command line.
from __future__ import absolute_import
__title__ = 'jrnl'
__version__ = '1.9.5'
__version__ = '1.9.6'
__author__ = 'Manuel Ebert'
__license__ = 'MIT License'
__copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'

View file

@ -48,7 +48,10 @@ def parse(date_str, inclusive=False, default_hour=None, default_minute=None):
return None
if flag is 1: # Date found, but no time. Use the default time.
date = datetime(*date[:3], hour=default_hour or 0, minute=default_minute or 0)
date = datetime(*date[:3],
hour=23 if inclusive else default_hour or 0,
minute=59 if inclusive else default_minute or 0,
second=59 if inclusive else 0)
else:
date = datetime(*date[:6])

View file

@ -71,15 +71,18 @@ def py2encode(s):
def prompt(msg):
"""Prints a message to the std err stream defined in util."""
if not msg:
return
if not msg.endswith("\n"):
msg += "\n"
STDERR.write(u(msg))
def py23_input(msg=""):
STDERR.write(u(msg))
prompt(msg)
return STDIN.readline().strip()
def py23_read(msg=""):
prompt(msg)
return STDIN.read()
def yesno(prompt, default=True):
@ -93,7 +96,7 @@ def load_and_fix_json(json_path):
"""
with open(json_path) as f:
json_str = f.read()
config = fixed = None
config = None
try:
return json.loads(json_str)
except ValueError as e: