mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
* Updating changelog [ci skip] * Incrementing version to v2.4 [ci skip] * [DayOne] remove extra spaces from the titles of edited DayOne entries Otherwise, a leading space was being introduced * [DayOne] maintain existing tags stored in DayOne metadata * [DayOne] brings back extended DayOne attributes * [DayOne] maintain metadata on edited entries Fixes #358, See also #159 * [DayOne Exporter] apply black formatting * [JSON Exporter] add support for extended DayOne Metadata * [DayOne] [Tests] test that extended DayOne metadata is added to new entries Co-authored-by: Jrnl Bot <jrnl.bot@gmail.com>
77 lines
2.9 KiB
Gherkin
77 lines
2.9 KiB
Gherkin
Feature: Dayone specific implementation details.
|
|
|
|
Scenario: Loading a DayOne Journal
|
|
Given we use the config "dayone.yaml"
|
|
When we run "jrnl -from 'feb 2013'"
|
|
Then we should get no error
|
|
and the output should be
|
|
"""
|
|
2013-05-17 11:39 This entry has tags!
|
|
|
|
2013-06-17 20:38 This entry has a location.
|
|
|
|
2013-07-17 11:38 This entry is starred!
|
|
"""
|
|
|
|
# broken still
|
|
@skip
|
|
Scenario: Entries without timezone information will be interpreted as in the current timezone
|
|
Given we use the config "dayone.yaml"
|
|
When we run "jrnl -until 'feb 2013'"
|
|
Then we should get no error
|
|
and the output should contain "2013-01-17T18:37Z" in the local time
|
|
|
|
Scenario: Writing into Dayone
|
|
Given we use the config "dayone.yaml"
|
|
When we run "jrnl 01 may 1979: Being born hurts."
|
|
and we run "jrnl -until 1980"
|
|
Then the output should be
|
|
"""
|
|
1979-05-01 09:00 Being born hurts.
|
|
"""
|
|
|
|
Scenario: Loading tags from a DayOne Journal
|
|
Given we use the config "dayone.yaml"
|
|
When we run "jrnl --tags"
|
|
Then the output should be
|
|
"""
|
|
@work : 1
|
|
@play : 1
|
|
"""
|
|
|
|
Scenario: Saving tags from a DayOne Journal
|
|
Given we use the config "dayone.yaml"
|
|
When we run "jrnl A hard day at @work"
|
|
and we run "jrnl --tags"
|
|
Then the output should be
|
|
"""
|
|
@work : 2
|
|
@play : 1
|
|
"""
|
|
|
|
Scenario: Filtering by tags from a DayOne Journal
|
|
Given we use the config "dayone.yaml"
|
|
When we run "jrnl @work"
|
|
Then the output should be
|
|
"""
|
|
2013-05-17 11:39 This entry has tags!
|
|
"""
|
|
|
|
Scenario: Exporting dayone to json
|
|
Given we use the config "dayone.yaml"
|
|
When we run "jrnl --export json"
|
|
Then we should get no error
|
|
and the output should be parsable as json
|
|
and the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1"
|
|
|
|
Scenario: Writing into Dayone adds extended metadata
|
|
Given we use the config "dayone.yaml"
|
|
When we run "jrnl 01 may 1979: Being born hurts."
|
|
and we run "jrnl --export json"
|
|
Then "entries" in the json output should have 5 elements
|
|
and the json output should contain entries.0.creator.software_agent
|
|
and the json output should contain entries.0.creator.os_agent
|
|
and the json output should contain entries.0.creator.host_name
|
|
and the json output should contain entries.0.creator.generation_date
|
|
and the json output should contain entries.0.creator.device_agent
|
|
and "entries.0.creator.software_agent" in the json output should contain "jrnl"
|