Filters before exporting

This commit is contained in:
Manuel Ebert 2013-08-06 17:57:21 -07:00
parent 571a2677eb
commit e5ee4e3f97
2 changed files with 5 additions and 3 deletions

View file

@ -54,6 +54,7 @@ class Journal(object):
consts.DOWParseStyle = -1 # "Monday" will be either today or the last Monday
self.dateparse = pdt.Calendar(consts)
self.key = None # used to decrypt and encrypt the journal
self.search_tags = None # Store tags we're highlighting
journal_txt = self.open()
self.entries = self.parse(journal_txt)

View file

@ -176,14 +176,15 @@ def cli(manual_args=None):
entry.starred = args.star
util.prompt("[Entry added to {0} journal]".format(journal_name))
journal.write()
# Reading mode
elif not mode_export:
else:
journal.filter(tags=args.text,
start_date=args.start_date, end_date=args.end_date,
strict=args.strict,
short=args.short)
journal.limit(args.limit)
# Reading mode
if not mode_export:
print(journal.pprint())
# Various export modes