mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-09 09:06:12 +02:00
Simplified exporting logic
This commit is contained in:
parent
4d681ca095
commit
b0c79d4b3b
2 changed files with 47 additions and 88 deletions
10
jrnl/jrnl.py
10
jrnl/jrnl.py
|
@ -190,14 +190,8 @@ def cli():
|
|||
elif args.tags:
|
||||
print(exporters.to_tag_list(journal))
|
||||
|
||||
elif args.export == 'json': # export to json
|
||||
print(exporters.to_json(journal, args.output))
|
||||
|
||||
elif args.export == 'markdown' or args.export == 'md': # export to markdown
|
||||
print(exporters.to_md(journal, args.output))
|
||||
|
||||
elif args.export == 'text' or args.export == 'txt': # export to text
|
||||
print(exporters.to_txt(journal, args.output))
|
||||
elif args.export is not False:
|
||||
print(exporters.export(journal, args.export, args.output))
|
||||
|
||||
elif (args.encrypt is not False or args.decrypt is not False) and not PYCRYPTO:
|
||||
print("PyCrypto not found. To encrypt or decrypt your journal, install the PyCrypto package from http://www.pycrypto.org.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue