Skip to content
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

DayOne: Editing existing entries with tags removes the tags when saving #358

Closed
flight16 opened this issue May 31, 2015 · 25 comments · Fixed by #928
Closed

DayOne: Editing existing entries with tags removes the tags when saving #358

flight16 opened this issue May 31, 2015 · 25 comments · Fixed by #928
Labels
day one Issues related to Day One (dayoneapp.com)

Comments

@flight16
Copy link

  1. Create a DayOne entry using DayOne.app and add a tag using the tag button at the top of the entry (don't include the tag in the body).
  2. Click save and see that the entry is now tagged.
  3. Close DayOne
  4. Run jrnl dayone -n 1 --edit and edit the entry you just added, and save it.
  5. Open DayOne and note that the latest entry is no longer tagged.
@flight16
Copy link
Author

flight16 commented Jun 1, 2015

This bug appears to have been caused by fd46ffe, but I haven't had time to investigate yet.

I think this highlights to missing tests:

  1. A test to flex the --edit code path which launches an external editor and make sure data round-trips OK.
  2. A test to verify the format of saved DayOne .xml to make sure it conforms to DayOne's expected format.

@minchinweb
Copy link
Contributor

I've been able to confirm the issue.

I think it is somewhat related to #351.

It actually exists much earlier. It exists as of ea6060d and as of 3912693, which dates to last September. Which makes me wonder if it has ever worked...


The problem seems to be here -> DayOneJournal.py which calls this function -> Entry.py


Does 8f12d62 fix it?

minchinweb added a commit to minchinweb/jrnl that referenced this issue Jun 4, 2015
minchinweb added a commit to minchinweb/jrnl that referenced this issue Nov 13, 2017
@stale
Copy link

stale bot commented Jul 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 7, 2019
@minchinweb minchinweb added the day one Issues related to Day One (dayoneapp.com) label Jul 8, 2019
@wren wren removed the stale label Jul 29, 2019
minchinweb added a commit to minchinweb/jrnl that referenced this issue Aug 2, 2019
@stale
Copy link

stale bot commented Sep 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue: will be closed soon if no activity label Sep 27, 2019
@minchinweb
Copy link
Contributor

waiting on merge of PR #350

@stale stale bot removed the stale Inactive issue: will be closed soon if no activity label Sep 27, 2019
@wren
Copy link
Member

wren commented Sep 27, 2019

@minchinweb Sorry, but it looks like #350 has merge conflicts again.

Honestly, I'm having some trouble with what to do with Day One functionality. I'm hoping we can talk it through a bit, since it seems to be an important feature for you.

The way I see it, the Day One functionality in jrnl needs some work to get it, and its tests, up to snuff. And then it also needs someone that can seriously commit to maintaining it long term. When I first started fixing up jrnl, I have to admit that the Day One functionality seemed like a top candidate for cutting out (for a variety of reasons that I'm happy to get into, if you're interested).

That being said, I want to respect the existing community of users, and especially existing contributors. If there's a feature that you value this much, I want to make sure it gets the attention it deserves.

I want to apologize for not being able to review your PRs in a timely manner. The main problem I'm having is that I have no way to run and/or test Day One Classic. And without it, I can't verify that a test entered into our current test suite works as intended. I also can't work on, or even review PRs that address Day One functionality in any meaningful way. So, whoever ends up fixing and maintaining the Day One functionality in jrnl, I don't think that person can be me.

All of that is to say, do you think that person can be you (or anyone else reading this)? Can you fix this part of jrnl and keep it maintained? If you want to make a serious commitment to do this, can we can talk through some steps to get this done? If not, that's perfectly fine. Either way, just let me know, and we can go from there.

@minchinweb
Copy link
Contributor

Hi @wren,

Let me preface this discussion by saying that there are two versions of Day One: the "Classic" version, and the current version, "DayOne 2". The Classic version allowed you to sync to Dropbox, which made the entries easily accessible to anywhere else you have your Dropbox synced to. v2 includes a sync feature, but seems to only be through an inaccessible, proprietary system. v2 was launched in 2016 and the Classic version was quickly thereafter sunsetted and removed from the App store. Dropbox changed their API about a year ago and so even if you somehow had access to the original app, it's unlikely the Dropbox sync would work today.

I'd be happy to do the work to keep support for DayOne Classic in jrnl. Let's leave the discussion for DayOne v2 for another day (as I don't use it). I don't actually have a way to run Day One Classic either, but I'm not sure it's really needed. Supporting a dead program like this has the added bonus that the file format should be entirely stable, warts and all. If you want more confidence that the test suite is actually testing what we're trying to do, we can work on expanding that.

What this issue is about is just being able to roundtrip correctly. That should be simple to build into the test suite (although I see it hasn't really been done in the case of #350). What I can say is that I've been running #350 locally for probably two years without issue.

Let me know what you think should be in place to feel more confident in our DayOne code.

@minchinweb
Copy link
Contributor

The merge conflict for #350 has been resolved, all the tests pass, and should be good to merge!

@micahellison
Copy link
Member

Hi @minchinweb, I read through #350 and I'm a little confused about this. What is your use case for integrating Journaley with jrnl?

@minchinweb
Copy link
Contributor

Journaley is a GUI client for DayOne Classic on Windows. Because both Journaley and jrnl read the DayOne Classic data files, I can use both to interact with my "journal". I use Journaley as an editing client for my daily work journal, and I use jrnl to covert that journal into a personal-use website (via Pelican).

@wren
Copy link
Member

wren commented Oct 25, 2019

@minchinweb Thanks for the explanation about everything. If we want to proceed, I'd like to take a few steps to make sure this functionality is fully supported, and also doesn't affect the rest of the project in any negative way.

I must confess that having a feature that nobody can test in any meaningful way makes me very weary. But I'm willing to proceed if you are willing to handle all of the Day One-related issues. This is the plan I would like to follow:

  1. Tests - Get a PR with the full set of Day One tests reinstated and updated to fully pass on the current version of jrnl. These should be separated into a Day One test file, and should, to the best of our ability, work on Mac and Windows. This PR should only have tests (no other code).
  2. PRs - New PRs should be contained entirely in the jrnl/DayOneJournal.py file. If there needs to be any changes outside of that file, they should be filed as a separate PR, with an associated issue filed to justify the change. From then on, I will rubber-stamp any changes to jrnl/DayOneJournal.py that you approve without any further testing on my part.

What do you think?

@minchinweb
Copy link
Contributor

@wren It sounds workable indeed; I'm happy to shepherd this along. If this doesn't work quite the way we haven imagined, we can always revisit our process. The only caveat that I would add is I intend to support only DayOne "Classic".

I'll start working on getting the pieces ready to cleanly merge. Is 2.5 the branch I should be targeting?

@wren
Copy link
Member

wren commented Oct 28, 2019

@minchinweb Yup, v2.5 sounds good. You can submit PRs to master, though, and I'll update as needed to hit our milestones.

I agree about Classic. We're currently not in a place to support Day One 2. Would you mind updating the docs, to reflect that as part of this?

@minchinweb
Copy link
Contributor

@wren #733 has been submitted to this end! Please let me know if there are any issues in getting it merged in.

@wren
Copy link
Member

wren commented Nov 13, 2019

@minchinweb Is it possible for you to submit a PR first with just the tests for Day One, per the plan we agreed to above? It would make it a lot easier to review.

@minchinweb minchinweb mentioned this issue Nov 14, 2019
7 tasks
@minchinweb
Copy link
Contributor

@wren : Created #742 with just DayOne tests! I didn't add any new tests, but just pulled in the ones that were previously removed.

@stale
Copy link

stale bot commented Jan 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue: will be closed soon if no activity label Jan 13, 2020
@minchinweb
Copy link
Contributor

bump

@stale stale bot removed the stale Inactive issue: will be closed soon if no activity label Jan 14, 2020
@stale
Copy link

stale bot commented Mar 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue: will be closed soon if no activity label Mar 14, 2020
@minchinweb
Copy link
Contributor

bump

@stale stale bot removed the stale Inactive issue: will be closed soon if no activity label Mar 15, 2020
@wren
Copy link
Member

wren commented Mar 15, 2020

@minchinweb Thanks for the reminder. Are you still planning to submit the follow-up PR for this?

@minchinweb
Copy link
Contributor

Yes, I intend to. The code is there in my previous omnibus PR's, I just need to figure out what code (from the omnibus PR) still needs to be merged in.

@wren
Copy link
Member

wren commented Mar 16, 2020

Ah, okay. Just wanted to make sure you weren't waiting on me for anything. Let me know if you need anything.

minchinweb added a commit to minchinweb/jrnl that referenced this issue Apr 27, 2020
@stale
Copy link

stale bot commented May 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue: will be closed soon if no activity label May 15, 2020
@micahellison
Copy link
Member

Looks like there's a PR in progress for this issue. Bumping to keep it from staling out.

@stale stale bot removed the stale Inactive issue: will be closed soon if no activity label May 16, 2020
micahellison pushed a commit that referenced this issue Jun 6, 2020
* 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 <[email protected]>
wren pushed a commit that referenced this issue Jul 25, 2020
* 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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
day one Issues related to Day One (dayoneapp.com)
Projects
None yet
4 participants