diff --git a/.gitignore b/.gitignore index 3b171aba..67f8822c 100644 --- a/.gitignore +++ b/.gitignore @@ -36,9 +36,13 @@ docs/_themes/jrnl/static/css/jrnl.css # MS Visual Studio (PyTools) obj *.pyproj +*.pyproj.user *.sln *.suo +# Sublime Text +*.sublime-* + # virtaulenv env/ env*/ @@ -50,3 +54,5 @@ docs/_themes/jrnl/static/less/3L.less # export testing director exp/ + +extras/ diff --git a/jrnl/exporters.py b/jrnl/exporters.py index 3a7c00c7..04ba6281 100644 --- a/jrnl/exporters.py +++ b/jrnl/exporters.py @@ -65,16 +65,16 @@ def to_txt(journal): """Returns the complete text of the Journal.""" return journal.pprint() + def to_yaml(entry): """Returns a markdown representation of the Journal with YAML formatted front matter""" - out = u'' - out += u'Title: {}\n'.format(entry.title) + out = u'Title: {}\n'.format(entry.title) out += u'Date: {}\n'.format(str(entry.date)) if entry.tags: # drop tag symbol out += u'Tags: {}\n'.format(', '.join([tag[1:] for tag in entry.tags])) - out += u'---\n\n{}'.format(entry.body) + out += u'{}'.format(entry.body) return out