Add support for DayOne2

This commit is contained in:
dbxnr 2020-01-10 15:05:10 +00:00
parent 9d9f61ac1e
commit c16afe1605
10 changed files with 208 additions and 29 deletions

View file

@ -0,0 +1,12 @@
default_hour: 9
default_minute: 0
editor: ''
template: false
encrypt: false
highlight: true
journals:
default: features/journals/dayone2.json
linewrap: 80
tagsymbols: '@'
timeformat: '%Y-%m-%d %H:%M'
indent_character: "|"

View file

@ -0,0 +1,27 @@
{
"entries": [
{
"audios": [],
"creationDate": "2020-01-10T12:22:12Z",
"photos": [],
"starred": false,
"tags": [],
"text": "Entry Number One.",
"timeZone": "Europe/London",
"uuid": "EBB5A5F4057F461E8F176E18AB7E0493"
},
{
"audios": [],
"creationDate": "2020-01-10T12:21:48Z",
"photos": [],
"starred": true,
"tags": [],
"text": "Entry Number Two.\n\nAnd a bit of text over here.",
"timeZone": "Europe/London",
"uuid": "EC61E5D4E66C44E6AC796E863E8BF7E7"
}
],
"metadata": {
"version": "1.2"
}
}

15
features/dayone2.feature Normal file
View file

@ -0,0 +1,15 @@
Feature: Day One 2.0 implementation details.
Scenario: Loading a Day One 2.0 journal
Given we use the config "dayone2.yaml"
When we run "jrnl -n 2"
Then we should get no error
and the output should be
"""
2020-01-10 12:21 Entry Number Two.
| And a bit of text over here.
2020-01-10 12:22 Entry Number One.
"""