-
-
Notifications
You must be signed in to change notification settings - Fork 542
Add extended metadata support for DayOne Classic #928
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
Conversation
Otherwise, a leading space was being introduced
Fixes jrnl-org#358, See also jrnl-org#159
micahellison
left a comment
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.
Could you please add some tests for this functionality?
|
I added a basic test to make sure that the extended metadata is being added to new entries. To do this, I added support for the extended metadata to the JSON exporter. To completion's sake, extended metadata should also be added to the XML exporter, but I'm less sure on how to add subkeys, as would be needed. Also, I discovered that we have no tests that cover editing an entry in the entire test suite. This is probably in part due to complexity (it would involve mocking opening an editor, changing the displayed file, and then closing the editor). One of the drivers of these changes was to make sure that extended metadata is maintained across edits, so at some point that would be good to add. If you're satisfied with the additional test, it should be good to merge. |
dee779a to
108cadc
Compare
micahellison
left a comment
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.
This looks good. Thanks for adding tests! Could you resolve the merge issues?
|
@micahellison done! |
micahellison
left a comment
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.
Thanks!
* 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>
Further to previous Pull Requests #350, #397, #739.
Closes #159. Closes #351. Closes #358.
Maintains extended metadata in DayOne entries when edited by jrnl. Export support for these have already been added.
This code has been used locally for probably 5 years now.
Checklist