Updated docs from master

This commit is contained in:
Manuel Ebert 2013-11-24 15:53:46 -08:00
parent 718aa11bb6
commit 936c54e70c
39 changed files with 85 additions and 61 deletions

Binary file not shown.

Binary file not shown.

View file

@ -7,7 +7,7 @@ jrnl is a simple journal application for your command line.
"""
__title__ = 'jrnl'
__version__ = '1.6.4'
__version__ = '1.6.5'
__author__ = 'Manuel Ebert'
__license__ = 'MIT License'
__copyright__ = 'Copyright 2013 Manuel Ebert'

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -157,10 +157,13 @@ def cli(manual_args=None):
journal = Journal.Journal(journal_name, **config)
if mode_compose and not args.text:
if config['editor']:
if not sys.stdin.isatty():
# Piping data into jrnl
raw = util.py23_read()
elif config['editor']:
raw = get_text_from_editor(config)
else:
raw = util.py23_input("[Compose Entry] ")
raw = util.py23_read("[Compose Entry, press Ctrl+D to finish writing]\n")
if raw:
args.text = [raw]
else:

Binary file not shown.

View file

@ -65,10 +65,14 @@ def prompt(msg):
msg += "\n"
STDERR.write(u(msg))
def py23_input(msg):
def py23_input(msg=""):
STDERR.write(u(msg))
return STDIN.readline().strip()
def py23_read(msg=""):
STDERR.write(u(msg))
return STDIN.read()
def yesno(prompt, default=True):
prompt = prompt.strip() + (" [Y/n]" if default else " [y/N]")
raw = py23_input(prompt)

Binary file not shown.