Allow custom file extensions for directory journal

This commit is contained in:
Thibaud Chupin 2024-03-23 19:50:41 +01:00
parent c8c49b1ba2
commit 6b742fd412
6 changed files with 43 additions and 11 deletions

View file

@ -22,9 +22,7 @@ use any extension. `jrnl` will automatically create the file when you save
your first entry.
## Folder
The folder journal format organizes your entries into subfolders for the year
and month and `.txt` files for each day. If there are multiple entries in a day,
they all appear in the same `.txt` file.
The folder journal format organizes your entries into subfolders for the year and month, and a new file for each day. If there are multiple entries in a day, they all appear in the same file. The file extension (`.txt` by default) can be configured with the `extension` configuration key.
The directory tree structure is in this format: `YYYY/MM/DD.txt`. For instance, if
you have an entry on May 5th, 2021 in a folder journal at `~/folderjournal`, it will

View file

@ -57,6 +57,15 @@ for details.
If `true`, encrypts your journal using AES. Do not change this
value for journals that already have data in them.
### extension
For [folder journals](journal-types.md#folder), control the extension of the day
files. By default it is `.txt`.
!!! warning
Changing the extension after a folder journal has been created will prevent
`jrnl` from finding past entries.
### template
The path to a text file to use as a template for new entries. Only works when you
have the `editor` field configured. If you use a template, the editor's