Jump to content

"Open in Finder" for individual notes?


Recommended Posts

I regularly need to modify ENML and XHTML files to fix poorly formatted clipped notes (increasingly so since EN 6.11), which means having to manually find the folder for the relevant note (cf. needle/haystack).

I know that it's possible to access the EN data folder via [OPT]-Help > Troubleshooting > Open Database Folder, but I was hoping something like this was possible for individual notes too, via AppleScript or some other hack.

Any help appreciated.

Link to comment
  • Level 5*
On 2017-08-05 at 3:29 AM, doonyakka said:

I know that it's possible to access the EN data folder via [OPT]-Help > Troubleshooting > Open Database Folder, but I was hoping something like this was possible for individual notes too, via AppleScript or some other hack.

Nice to see another user crazy enough to work with the raw files5985e5b29614c_ScreenShot2017-08-05at08_33_02.png.1d20ab92d8644850f7a40f5e303974ab.png
For the uninformed, on Macs there is a folder for each note
all the note files are sitting there and can be accessed.  
The image shows the files for one of my notes

Here's my applescript to identify the note folder

  • The database folder is hardcoded
  • Uses sql to access the sqlite database (select ...... )

--Identify the Note Guid

tell application "Evernote"
    set
theSelection to get selection
    set theNote to item 1 of theSelection
    set theLink to note link of theNote
end tell

set AppleScript's text item delimiters to "/"
set parsedList to text items of theLink
set noteGUID to item 7 of parsedList

--Retrieve the Note Folder from the database

set targetDatabaseFolder to "/Users/david/Library/Application/.../www.evernote.com/1156250/"
set targetDatabaseFile to targetDatabaseFolder & "LocalNoteStore.sqlite"
set sqlText to "SELECT ZLOCALUUID FROM ZenNote where ZGUID = '" & noteGUID & "';"
set localFolder to text items of (do shell script "sqlite3 " & quote & targetDatabaseFile & quote & " " & quote & sqlText & quote)
set localFolder to targetDatabaseFolder & "content/" & localFolder

tell application "Finder" to open folder localFolder as POSIX file

 
Link to comment
16 hours ago, DTLow said:

Here's my applescript to identify the note folder

  • The database folder is hardcoded
  • Uses sql to access the sqlite database (select ...... )

Wow...that's really cool and works perfectly! Thanks so much! :-)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...