Tips for integrating DTPO & notes.app in El Capitan

Is there any way to automate either importing or indexing of Apple notes.app with DTPO? You can manually add to DTPO from the apps via Sharing, but I would like to be able to search for a note via DTPO/Launch Bar and keep an export of the note in DTPO if possible.

Not easily, no. Notes.app is a fundamentally different app under-the-hood. Because of the changes you cannot index the notes.

So, “is there a way” ? There’s a way to do most things, but not necessarily an easy one.

Thanks, can you or anyone suggest some ideas to try, I don’t mind a bit of a kludge to do it.

Notes uses a SQLite database so there’s no way to directly index it, as Jim indicated.

The app has pretty good scripting support.

Here’s a simple script to import all your notes:


tell application id "DNtp"
	set theDestination to display group selector
end tell

tell application "Notes"
	
	set theNotes to every note
	repeat with thisNote in theNotes
		set theBody to body of thisNote
		tell application id "DNtp"
			set theRecord to create record with {name:name of thisNote, type:html, plain text:theBody} in theDestination
		end tell
	end repeat
	
end tell

The notes are stored in Notes in HTML, so this script doesn’t bother to convert that to some other format – although that’s possible. It also has no error checking, and does not bother to check if a note is a duplicate or updated. Most important, it does not bother with the styling in the original note nor does it restore attached images. Someone else can add those sophistications.

Thanks very much; it worked flawlessly importing my notes. One of life’s regrets is I don’t program in Apple Script. If someone can build on this that would be great; one limitation/warning of the current script is that it brings in everything; you can’t run it once, make a new Apple note, run it and have it only bring in the new note; if you could then it would be easy to automate.

Thanks again to BlueFrog and Korm for their speedy replies. Right now the syncing between ios and osx with Apple Notes is tip top; my hope is this problem of getting information between ios and osx will disappear when v2 of DTTG becomes available.

Bob

Please tell me someone has devised a way to index Apple’s Notes app. I find Notes to be a perfect place for quick writing and if only I could index it with DTPO… Has anyone tried doing it via IFTTT or WorkFlowy?

Fingers crossed…

Your notes are in a SQLite database at

~/Library/Group Containers/group.com.apple.notes/.

Cannot be indexed. You could hack into it, I suppose, with your own SQL utilities – and of course damage anything that’s there. But, it’s your data to do with what you want :laughing:

Indexing requires files in the filesystem. Apple no longer stores much of its content this way (including Notes and Messages). This makes it easier for them to just sync the SQL data to iCloud and other devices, but it also means you cannot index the data. It’s also why you can’t drag and drop from Notes to DEVONthink. There is no file to drop.