mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Include the year in exported file name
This commit is contained in:
parent
fadbdc27b9
commit
18994f1aa1
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ def export(journal, format, output=None):
|
||||||
def write_files(journal, path, format):
|
def write_files(journal, path, format):
|
||||||
"""Turns your journal into separate files for each entry.
|
"""Turns your journal into separate files for each entry.
|
||||||
Format should be either json, md or txt."""
|
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:
|
for e in journal.entries:
|
||||||
full_path = os.path.join(path, make_filename(e))
|
full_path = os.path.join(path, make_filename(e))
|
||||||
if format == 'json':
|
if format == 'json':
|
||||||
|
|
Loading…
Add table
Reference in a new issue