I read a post on the Evernote forum the other day from a writer who wanted to use notes from Evernote in Scrivener, a word processing/research program designed specifically for authors/screenwriters. It’s a fantastic program — the kind that really opens people’s eyes to quality of Mac applications — but it isn’t scriptable. Head Scrivener Guru Keith said in a post on his own forum this past December “Just for the record, it’s highly unlikely that Scrivener will be getting AppleScript support any time soon. It’s a big job and low down on the list – certainly it won’t be making 1.5. It is still slated for a distant future release, though!”
And though HTML export is planned for a future version of Evernote (and, perhaps, even sooner than that….), there has to be a way we can help this guy out…you know….NOW!
Now that Evernote has released native HTML export, there’s two ways to help this guy out:
- Have him export his files to HTML directly from Evernote (which he can then import into Scrivener’s “Research” folder and refer to as a reference), or
- If he needs to edit the notes inside of Scrivener, the answer is this AppleScript — It converts notes from Evernote into Rich Text Format with Attachments (RTFD files)! He can then import them in to Scrivener (or any other program that accepts RTF files) and edit away!
Don’t you just love AppleScript?
Features — Updated October 17, 2010
- This script exports a rich text copy of selected Evernote items and saves them in RTFD format. It also leaves an HTML copy of the note (and its resources) inside a sub-folder named after the note (in case you find it useful!)
- Automatic Growl detection has also been enabled which will save you a trip to the Script Editor to enable/disable it.
Current Limitations and Open Issues
(Otherwise known as “Places Where You Could Help Out!”)
- The RTFD conversion works with most notes, but not with PDFs! The script exports any available text information to the RTFD file and places attached files in a resource folder by the same name at your export location.
- Notes with typographic symbols in the title will sometimes halt the conversion (see an example in the picture below). I’ve done some work on having the script automatically eliminate the offending characters but, if you still have problems with a particular note, just edit the symbols out of the title and you should be fine!
- Errors that will undoubtedly arise when you do something that I didn’t think of or test for! 😉
How to Install and Use
Just highlight the notes you want to export in Evernote and then run the script (you can highlight multiple notes). Tell the script where you’d like the files saved and it will go to work!
- You can highlight multiple notes;
- You can save this script to /Library/Scripts/ and launch it using the system-wide script menu from the Mac OS X menu bar (The script menu can be activated using the AppleScript Utility application). Keyboard shortcuts can also be assigned to AppleScripts in the script menu using the System Preferences “Keyboard & Mouse Settings”.
FastScript link and support
Do yourself a favor and download and install FastScripts from Red Sweater. Triggering the script from the keyboard really makes things almost second-nature: you’ll watch items practically fly into and out of Evernote with a few keystrokes!
Here’s how you set it up:
- Copy script or an Alias to ~/Library/Scripts/Applications/Evernote
- Set up your keyboard shortcut in the FastScripts Preference menu
For my FastScripts workflow, I am using ⌘ R (as in RTF).
- 1.30 (OCTOBER 17, 2010) UPDATED TO UTILIZE EVERNOTE API FOR SELECTION
- 1.20 (JULY 17, 2009) UPDATED TO FIX A COSMETIC ISSUE, CHANGE PATH FOR RTFD FILES
- 1.10 (MAY 29, 2009) UPDATED TO USE NATIVE HTML EXPORT, CREATE RTFD FILES
- 1.00 (MAY 12, 2009) INITIAL RELEASE OF SCRIPT