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

Proposal: Add text to note in CLI #51

Open
tonypony220 opened this issue Sep 10, 2024 · 1 comment
Open

Proposal: Add text to note in CLI #51

tonypony220 opened this issue Sep 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@tonypony220
Copy link

Very nice project, wdy on give a short commad like extend to add some raw text to some note?

@RhetTbull
Copy link
Owner

I'd love to be able to do this -- would help my workflow. (I'd probably use append as the command) However, I've not implemented anything like this because I cannot make a guarantee that doing so won't lose formatting and/or data associated with the note. Apple uses a proprietary format to store the actual notes. The AppleScript interface used by macnotesapp is very limited. For example, retrieving the body of a note can be done in either HTML format or plain text. Either loses information associated with the note. For example, check boxes (and the associated checked state) in the note will be lost. Keywords will also be lost. Apple provides no way to append to a note without retrieving the body, appending text (in either HTML or plain text) and setting the note to the new body. This roundtrip also loses text formatting (fonts, sizes, etc). This could work for plain text notes but there's not a way as far as I can tell to determine if a note uses any features that would cause data loss during an append.

I use macOS Ventura as my daily driver. It's possible that Apple has fixed this in a later release of macOS and I'm happy to check when I get a chance but I very much doubt it. They've all but abandoned AppleScript in favor of Shortcuts. There are bugs in the Photos and the Notes AppleScript interfaces that have been present for many years; it doesn't appear Apple wants to spend any resources on improving the scripting interface nor do they provide an API for working with Notes.

@RhetTbull RhetTbull added enhancement New feature or request labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants