mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
filter the journal according to search also for html display
This commit is contained in:
parent
ee57119f0e
commit
7e762e1d63
2 changed files with 8 additions and 10 deletions
|
@ -47,7 +47,6 @@ def to_html(journal, open_in_browser=False):
|
|||
and can open it in the default browser"""
|
||||
bla = to_md(journal)
|
||||
html_body = markdown.markdown(bla.decode('utf8'))
|
||||
print html_body
|
||||
tmp_file = os.path.join(tempfile.gettempdir(), "pretty.html")
|
||||
url = 'file://' + tmp_file
|
||||
output_file = codecs.open(tmp_file, "w", encoding="utf8")
|
||||
|
|
17
jrnl/jrnl.py
17
jrnl/jrnl.py
|
@ -185,13 +185,16 @@ def cli():
|
|||
journal.write()
|
||||
|
||||
# Reading mode
|
||||
elif not mode_export:
|
||||
elif not mode_export or args.html:
|
||||
journal.filter(tags=args.text,
|
||||
start_date=args.start_date, end_date=args.end_date,
|
||||
strict=args.strict,
|
||||
short=args.short)
|
||||
start_date=args.start_date, end_date=args.end_date,
|
||||
strict=args.strict,
|
||||
short=args.short)
|
||||
journal.limit(args.limit)
|
||||
print(journal)
|
||||
if args.html:
|
||||
exporters.to_html(journal, True)
|
||||
else:
|
||||
print(journal)
|
||||
|
||||
# Various export modes
|
||||
elif args.tags:
|
||||
|
@ -203,10 +206,6 @@ def cli():
|
|||
elif args.markdown: # export to json
|
||||
print(exporters.to_md(journal))
|
||||
|
||||
elif args.html: #export to html and open in browser
|
||||
print 'test'
|
||||
exporters.to_html(journal, True)
|
||||
|
||||
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
Reference in a new issue