mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-29 22:16:13 +02:00
Add display format option to config file. (#1050)
* Add display format option to config file. * Add tests. * Fix `black` error. * Change nested if to top level.
This commit is contained in:
parent
05d0a0cc83
commit
8c2de0e6d7
5 changed files with 67 additions and 2 deletions
|
@ -300,7 +300,8 @@ def _display_search_results(args, journal, **kwargs):
|
|||
elif args.export:
|
||||
exporter = plugins.get_exporter(args.export)
|
||||
print(exporter.export(journal, args.filename))
|
||||
|
||||
elif kwargs["config"].get("display_format"):
|
||||
exporter = plugins.get_exporter(kwargs["config"]["display_format"])
|
||||
print(exporter.export(journal, args.filename))
|
||||
else:
|
||||
# Default display mode
|
||||
print(journal.pprint())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue