Jump to content
Sign in to follow this  
christianboyce

mac (Archived) Use AppleScript to read contents of a note?

Recommended Posts

I have a number of notes in Evernote that were created using "Print to Evernote" in the Print dialog. They are invoices, and our accounting system titles them all "Status.pdf." I want to rename these notes to reflect the name of the customer. I can see in the note, in the sixth line, the customer's name, so I want to scoop that up and set the note's title to that. The text in each note is selectable since they were created using Print to Evernote (that is, they are PDFs that began life on the Mac, not as scans), and the customer's name is always in the sixth line. It's a great candidate for scripting.

So.. how do I "get" the text of line six of the note using AppleScript? Can I somehow get it from the HTML content, or the ENML content, of the note? Seems like it could be possible. But I haven't figured it out.

Can anyone tell me how to do this?

Share this post


Link to post

Hi Christian,

I'd love for a plain text version of a note (and/or the "recognized text" information) to be available to AppleScript and have forwarded that suggestion to the Mac team. If it's important to you, you should let them know.

In the meantime, here is a post from MacScripter which presents a couple of options: Using Automator's "Extract PDF Text" workflow or using an app called Skim to do it via AppleScript.

Hope this helps!

Share this post


Link to post

This is a VERY late response but thank you very much for the "Skim" idea. It works for me. Basically I export the note from Evernote to my desktop, open the note with Skim, find what I'm looking for, and do the processing I want to do-- all in one AppleScript. Works perfectly. Thanks again for the idea.

Share this post


Link to post

My script is based on one I found at Veritrope so I don't think it's worth posting, at least not in its entirety. Excellent resource, Veritrope. Much obliged.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...