-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom file extensions for directory journal #1873
base: develop
Are you sure you want to change the base?
Changes from all commits
6b742fd
8d9c27f
8e5b5b6
cbf4ed5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,22 @@ Feature: Journals iteracting with the file system in a way that users can see | |
And the journal directory should contain | ||
2013/07/23.txt | ||
|
||
@skip_win # https://github.com/jrnl-org/jrnl/issues/1894 | ||
Scenario: Adding entries to a Folder journal with a custom extension should generate date files | ||
Given we use the config "empty_folder_with_extension.yaml" | ||
When we run "jrnl 23 July 2013: Testing folder journal." | ||
Then we should get no error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Congratulations, your test uncovered an existing bug! 🎉 I filed it in #1894. Looks like Feel free to copy that "empty" file to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't replicate this. I'm not sure what might have caused the issue. I re-ran the tests without the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like bug #1894 is Windows-only, and this is combined with a limitation of git: since we can only commit files (not directories), that |
||
And the journal directory should contain | ||
2013/07/23.md | ||
|
||
Scenario: Adding multiple entries to a Folder journal should generate multiple date files | ||
Given we use the config "empty_folder.yaml" | ||
When we run "jrnl 23 July 2013: Testing folder journal." | ||
And we run "jrnl 3/7/2014: Second entry of journal." | ||
And we run "jrnl 5/3/2014: Second entry of journal." | ||
Then we should get no error | ||
And the journal directory should contain | ||
2013/07/23.txt | ||
2014/05/03.txt | ||
|
||
Scenario: If the journal and its parent directory don't exist, they should be created | ||
Given we use the config "missing_directory.yaml" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
default_hour: 9 | ||
default_minute: 0 | ||
editor: '' | ||
template: false | ||
encrypt: false | ||
extension: .md | ||
highlight: true | ||
journals: | ||
default: features/journals/empty_folder_with_extension/ | ||
linewrap: 80 | ||
tagsymbols: '@' | ||
timeformat: '%Y-%m-%d %H:%M' | ||
indent_character: "|" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only thing left on this PR is supporting a lack of dots in the extension. For instance, I'd expect this to work the same whether my config value is
extension: md
orextension: .md