Merge pull request #225 from jdevera/patch-1

Include the year in exported file name
This commit is contained in:
Manuel Ebert 2014-06-30 10:06:02 +02:00
commit 9c592cfd36

View file

@ -100,7 +100,7 @@ def export(journal, format, output=None):
def write_files(journal, path, format):
"""Turns your journal into separate files for each entry.
Format should be either json, md or txt."""
make_filename = lambda entry: e.date.strftime("%C-%m-%d_{0}.{1}".format(slugify(u(e.title)), format))
make_filename = lambda entry: e.date.strftime("%Y-%m-%d_{0}.{1}".format(slugify(u(e.title)), format))
for e in journal.entries:
full_path = os.path.join(path, make_filename(e))
if format == 'json':