mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Filters before exporting
This commit is contained in:
parent
571a2677eb
commit
e5ee4e3f97
2 changed files with 5 additions and 3 deletions
|
@ -54,6 +54,7 @@ class Journal(object):
|
||||||
consts.DOWParseStyle = -1 # "Monday" will be either today or the last Monday
|
consts.DOWParseStyle = -1 # "Monday" will be either today or the last Monday
|
||||||
self.dateparse = pdt.Calendar(consts)
|
self.dateparse = pdt.Calendar(consts)
|
||||||
self.key = None # used to decrypt and encrypt the journal
|
self.key = None # used to decrypt and encrypt the journal
|
||||||
|
self.search_tags = None # Store tags we're highlighting
|
||||||
|
|
||||||
journal_txt = self.open()
|
journal_txt = self.open()
|
||||||
self.entries = self.parse(journal_txt)
|
self.entries = self.parse(journal_txt)
|
||||||
|
|
|
@ -176,14 +176,15 @@ def cli(manual_args=None):
|
||||||
entry.starred = args.star
|
entry.starred = args.star
|
||||||
util.prompt("[Entry added to {0} journal]".format(journal_name))
|
util.prompt("[Entry added to {0} journal]".format(journal_name))
|
||||||
journal.write()
|
journal.write()
|
||||||
|
else:
|
||||||
# Reading mode
|
|
||||||
elif not mode_export:
|
|
||||||
journal.filter(tags=args.text,
|
journal.filter(tags=args.text,
|
||||||
start_date=args.start_date, end_date=args.end_date,
|
start_date=args.start_date, end_date=args.end_date,
|
||||||
strict=args.strict,
|
strict=args.strict,
|
||||||
short=args.short)
|
short=args.short)
|
||||||
journal.limit(args.limit)
|
journal.limit(args.limit)
|
||||||
|
|
||||||
|
# Reading mode
|
||||||
|
if not mode_export:
|
||||||
print(journal.pprint())
|
print(journal.pprint())
|
||||||
|
|
||||||
# Various export modes
|
# Various export modes
|
||||||
|
|
Loading…
Add table
Reference in a new issue