Include the year in exported file name

This commit is contained in:
Jacobo de Vera 2014-06-30 07:01:33 +02:00
parent fadbdc27b9
commit 18994f1aa1

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':