mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
Reading mode if no text supplied and Raw_input gets skipped
This commit is contained in:
parent
1ba3b3e58c
commit
a8dc91ce1c
1 changed files with 8 additions and 3 deletions
11
jrnl.py
11
jrnl.py
|
@ -204,13 +204,18 @@ if __name__ == "__main__":
|
|||
compose = False
|
||||
elif not args.date and args.text and all(word[0] in config['tagsymbols'] for word in args.text):
|
||||
# No date and only tags?
|
||||
print args.text, all(word[0] in config['tagsymbols'] for word in args.text)
|
||||
compose = False
|
||||
|
||||
# No text? Query
|
||||
if compose and not args.text:
|
||||
args.text = [raw_input("Compose Entry: ")]
|
||||
|
||||
# Nothing entered? Go to viewing mode.
|
||||
if not args.text:
|
||||
compose = False
|
||||
|
||||
# Writing mode
|
||||
if compose:
|
||||
if not args.text:
|
||||
args.text = [raw_input("Compose Entry: ")]
|
||||
raw = " ".join(args.text).strip()
|
||||
journal.new_entry(raw, args.date)
|
||||
print journal
|
||||
|
|
Loading…
Add table
Reference in a new issue