mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
Merge pull request #225 from jdevera/patch-1
Include the year in exported file name
This commit is contained in:
commit
9c592cfd36
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):
|
||||
"""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':
|
||||
|
|
Loading…
Add table
Reference in a new issue