Closed jareware closed 1 year ago
Thank you for suggesting this change! The idea of wrapping this up into something that's "easier" for a user to pick up and run like Docker has been on my mind, but I've never put time into playing with it. I'll take a look at your Docker file and test it on a few of my systems to see how well it handles those use cases.
@threeplanetssoftware any chance of merging this in, and/or making the image available on the public repo? Would make my backup cronjob even nicer, being able to pull from GitHub. 😇
Thank you for your patience and supremely polite poke! My apologies for not getting to this yet, I've had some other priorities sucking up my time. Because I'm generally more of a user of Docker, not an author, I've been wanting to make sure I understand how this affects each of the three OS' I claim to support (Windows, MacOS, and *nix). I will try to carve out some time in the near term.
Edit: Got this running on my Linux testbed today. Needed a few tweaks, I will try to test Windows and Mac also soon.
Yeah no worries, I know how taxing OSS maintenance can be. 😅
Thanks again for such a lovely utility. 🙌
Ok, I've had a go at this on Linux and MacOS so far. I like the idea of having a Docker image, but am not ready to merge this PR. I like it because, as you point out, this can solve a lot of the dependency issues I've hit before by controlling the specific versions of Ruby and the gems involved. That will certainly be useful and I thank you for bring up the idea.
I'm not quite ready to merge yet for a few reasons. One is that what seems straight forward to some, might not be to others. My own experience with Docker in testing this says I'll need to update the Readme to very clearly explain what is going on and how someone can use it. The commands needed to run this, even if the "binary" itself is pretty static, are more complex than using ruby to run it. I will likely shy away from telling folks how to build it and focus instead on the assumption that an image exists on GitHub.
In addition, the build instructions assume bundle install
has already been run on the repo and the build fails if Gemfile.lock isn't present. I've been removing that line in my tests (and bumping the version to Ruby 3.2 for future-proofing), but to control the gem versions for releases I would want to keep that in. Before I push this, I'll want to know it works on Linux, MacOS, and Windows starting from a bare repo checkout and following the step-by-step in the Readme (and, fair point, if the Readme leads by saying "make sure you bundle install
" then that covers that issue.
Finally, my test results have not yet been stellar. My results on MacOS today are just throwing permission errors trying to open NoteStore.sqlite. Granted, my testbed Mac is abysmally old and slow, but I'm not sure what is going on and why it is failing. On Linux things worked nicely, but I want to make sure people understand why files are spat out appearing to be owned by root in their home directory (and I assume the same will be true on MacOS once that works).
To summarize what I'd like to see before merging (and you don't necessarily have to do these, I'll pursue getting Docker working either way):
rake
in the folder so users don't have to guess how to write volume includes. In other words, have a docker_run_file.sh
that is essentially mounting a NoteStore.sqlite in the same folder, a docker_run_mac.sh
that is mounting the Notes group container, etc.I hope this doesn't seem to onerous a review, I'm sure it works well for you and your use case as it is right now! I just want to make sure things are clearly rolled out and don't leave myself some IOUs for tickets to be completed later.
Thanks!
Just as a quick update, I've been messing with this as I have the time. I am making progress, just trying to make sure it tested well enough to be sure it will work in a few environments was published. I've made a good bit of changes, so I will likely commit my own branch and give you credit for the idea.
Could you please help me troubleshoot something? I continue to run into errors attempting to access Notes directly as you did above. Would you please run this and tell me if there are any extended attributes?
xattr -l ~/Library/Group\ Containers/group.com.apple.notes/NoteStore.sqlite
Thank you!
Doing more digging, it seems like the permissions in ~/Library/Group Containers might be causing issues. Can you tell me if you changed permissions for the notes folder? Is it still 700? Did you run docker as root, or your normal user?
Ok, I made my own feature branch for this, did a bunch of testing, and pushed it into master. As of v0.12.2, ghcr.io now has a Docker image for this package (ghcr.io/threeplanetssoftware/apple_cloud_notes_parser:latest
)! I'm not completely happy with it yet, will continue to tweak, but didn't want to let perfection be the enemy of the good.
Please let me know if this works for you.
This makes it easier to run the app cross-platform, without worrying about local ruby versions etc:
Also, if you'd like, you can push the image to GitHub:
So then folks don't need to even clone/build, just have Docker installed:
Thanks again for the fantastic app!