mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-29 22:16:13 +02:00
Fix bug that prevented --format pretty and --format short from working (#1177)
This commit is contained in:
parent
b9a6d029e2
commit
a3f4f6b944
7 changed files with 79 additions and 2 deletions
|
@ -323,9 +323,12 @@ def _delete_search_results(journal, old_entries, **kwargs):
|
|||
|
||||
|
||||
def _display_search_results(args, journal, **kwargs):
|
||||
if args.short:
|
||||
if args.short or args.export == "short":
|
||||
print(journal.pprint(short=True))
|
||||
|
||||
elif args.export == "pretty":
|
||||
print(journal.pprint())
|
||||
|
||||
elif args.tags:
|
||||
print(plugins.get_exporter("tags").export(journal))
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ __exporters = [
|
|||
__importers = [JRNLImporter]
|
||||
|
||||
__exporter_types = {name: plugin for plugin in __exporters for name in plugin.names}
|
||||
__exporter_types["pretty"] = None
|
||||
__exporter_types["short"] = None
|
||||
__importer_types = {name: plugin for plugin in __importers for name in plugin.names}
|
||||
|
||||
EXPORT_FORMATS = sorted(__exporter_types.keys())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue