mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 01:18:31 +02:00
commit
f2b3f56993
5 changed files with 15 additions and 4 deletions
|
@ -3,6 +3,7 @@ Changelog
|
||||||
|
|
||||||
### 1.6 (November 5, 2013)
|
### 1.6 (November 5, 2013)
|
||||||
|
|
||||||
|
* __1.6.5__ Allows composing multi-line entries on the command line or importing files
|
||||||
* __1.6.4__ Fixed a bug that caused creating encrypted journals to fail
|
* __1.6.4__ Fixed a bug that caused creating encrypted journals to fail
|
||||||
* __1.6.3__ New, pretty, _useful_ documentation!
|
* __1.6.3__ New, pretty, _useful_ documentation!
|
||||||
* __1.6.2__ Starring entries now works for plain-text journals too!
|
* __1.6.2__ Starring entries now works for plain-text journals too!
|
||||||
|
|
|
@ -15,6 +15,9 @@ Composing mode is entered by either starting ``jrnl`` without any arguments -- w
|
||||||
|
|
||||||
jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny.
|
jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny.
|
||||||
|
|
||||||
|
You can also import an entry directly from a file::
|
||||||
|
|
||||||
|
jrnl < my_entry.txt
|
||||||
|
|
||||||
Smart timestamps
|
Smart timestamps
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
|
@ -7,7 +7,7 @@ jrnl is a simple journal application for your command line.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = 'jrnl'
|
__title__ = 'jrnl'
|
||||||
__version__ = '1.6.4'
|
__version__ = '1.6.5'
|
||||||
__author__ = 'Manuel Ebert'
|
__author__ = 'Manuel Ebert'
|
||||||
__license__ = 'MIT License'
|
__license__ = 'MIT License'
|
||||||
__copyright__ = 'Copyright 2013 Manuel Ebert'
|
__copyright__ = 'Copyright 2013 Manuel Ebert'
|
||||||
|
|
|
@ -157,10 +157,13 @@ def cli(manual_args=None):
|
||||||
journal = Journal.Journal(journal_name, **config)
|
journal = Journal.Journal(journal_name, **config)
|
||||||
|
|
||||||
if mode_compose and not args.text:
|
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)
|
raw = get_text_from_editor(config)
|
||||||
else:
|
else:
|
||||||
raw = util.py23_input("[Compose Entry] ")
|
raw = util.py23_read("[Compose Entry, press Ctrl+D to finish writing]\n")
|
||||||
if raw:
|
if raw:
|
||||||
args.text = [raw]
|
args.text = [raw]
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -65,10 +65,14 @@ def prompt(msg):
|
||||||
msg += "\n"
|
msg += "\n"
|
||||||
STDERR.write(u(msg))
|
STDERR.write(u(msg))
|
||||||
|
|
||||||
def py23_input(msg):
|
def py23_input(msg=""):
|
||||||
STDERR.write(u(msg))
|
STDERR.write(u(msg))
|
||||||
return STDIN.readline().strip()
|
return STDIN.readline().strip()
|
||||||
|
|
||||||
|
def py23_read(msg=""):
|
||||||
|
STDERR.write(u(msg))
|
||||||
|
return STDIN.read()
|
||||||
|
|
||||||
def yesno(prompt, default=True):
|
def yesno(prompt, default=True):
|
||||||
prompt = prompt.strip() + (" [Y/n]" if default else " [y/N]")
|
prompt = prompt.strip() + (" [Y/n]" if default else " [y/N]")
|
||||||
raw = py23_input(prompt)
|
raw = py23_input(prompt)
|
||||||
|
|
Loading…
Add table
Reference in a new issue