// DEVONthink to Evernote Exporter Applescript

Have a Mac and want to to save your DEVONthink items into Evernote easily?
Use this AppleScript!

Features

  • This script exports an HTML copy of selected DEVONthink items and saves them into Evernote.
  • The Group Name in DEVONthink is applied as a tag in Evernote;
  • Automatic Growl detection has also been enabled which will save you a trip to the Script Editor to enable/disable it.
    devon-to-ev

Current Limitations and Open Issues

March 3, 2010: Script Has Been Updated to Version 1.22 — Tagging Issue Resolved With the Help of Christian Grunenberg at DEVONtechnologies!

  • ** NEW** DEVONthink 2 is still new and not all of it’s features are currently working 100% in AppleScript (e.g., tagging). For now, all exported items will be tagged “From DEVONthink Pro” when brought into Evernote. In the near future, I expect that I will be able to support full tagging export with the script. (i.e., Check Back Soon!)
  • You should always proceed cautiously at first to understand how the script works before moving large amounts of your files around. I use this script myself and feel very comfortable with using it, but I cannot accept any responsibility for any data misadventure you might suffer. Use at your own risk!
  • 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 items in DEVONthink that you want to send to Evernote and run the script!

  1. If you’re importing a lot of items, I’d recommend that you change a few settings inside Evernote before beginning the import. In the “Clipping” tab of the Preferences menu, uncheck the boxes in the section called “After a clip:”
    disable windows
    If the boxes are checked while importing a large number of items, Evernote will fill your screen with open windows and sound like it is repeatedly shooting you with a laser from a 70′s Sci-Fi movie. Trust me — uncheck the boxes first and you’ll be much happier! ;)
  2. If you’d like, you can install this into DEVONthink’s Script Menu in the EXPORT folder

FastScript link and support

Do yourself a favor and download and install FastScripts from Red Sweater. Triggering the script from the keyboard really supercharges the process — you’ll watch items practically fly into Evernote with a few keystrokes! Here’s how you set it up:

  • Copy script or an Alias to ~/Library/Scripts/Applications/DEVONthink
  • Set up your keyboard shortcut in the FastScripts Preference menu

For my FastScripts workflow, I am using ⌘ E (as in Evernote) for my global “Send to Evernote Shortcut”. I use AppleScripts to move items from several programs into Evernote — FastScripts can detect which program I’m in and pick the appropriate script to create the note. All I have to remember is ⌘ E!

Source code and download link on the next page!

29 Responses to “DEVONthink to Evernote Exporter Applescript”

  1. Joe says:

    Anyway to get this to work in devonthink 1.9?
    Not working with this version..

    • Justin says:

      I haven’t tested this out, but you might try changing one line of the script in Script Editor to see if that gets you up and running:

      Open the Script in Script Editor and find the first line under the (* MAIN PROGRAM *) comment;

      Replace the line that says tell application id “com.devon-technologies.thinkpro2″ with tell application “DEVONthink Pro”

      Compile and save the script

      Let me know if that works for you — if it does, I may include that in the next revision of the script (assuming that it doesn’t break anything in 2.0!)

      Kind Regards,

      Justin

      • Joe says:

        Justin, thanks for the tip. I however solved it just by upgrading. Now that my stuff is out of Devonthink, i am fully into evernote.
        Actually, i only had devonthink personal, and i dont think the personal version has script support.

  2. Scott says:

    Is the link to the DevonThink –> Evernote utility still active? I could download other scripts but not thie one.

    Thx,

    Scott

  3. Robyn says:

    I wanted to try the change that Justin mentioned above to use this script with my copy of DEVONthink Pro 1.5.4, but I can’t get into the script (it’s run only) to make the change. And I tried pasting the code above directly into AppleScript Editor, but I got syntax errors.

    Help! I really want this to work, but I am just clueless. Thanks!

    • Justin says:

      Robyn,

      I quickly compiled a version for you to try — download link is under the original link.

      You’re going to have to be my “guinea pig” on this one, as I don’t have DEVONthink 1.x anymore…. try it out and let me know your results!

      • Robyn says:

        Hi Justin,

        Thanks for the fast response. I think it almost worked, but then I got the following dialogue box:

        “Item failed to import: -1728 DEVONthink Pro got an error: Can’t get of content id 24143 of database 1.”

        I guess I could upgrade to the DEVONthink 2.0 beta, but I am unsure whether I want to ultimately pay for the upgrade, hence the migration to Evernote — or at least that was my thinking…

        I look forward to hearing back from you, and again thanks for the fast turnaround — awesome!!! :)

        • Robyn says:

          Also, does the script need to notate that one is using DEVONthink Pro vs DEVONthink Personal? That just popped in my head as well as I downloaded the Pro 2.0 beta…thanks!

          • Justin says:

            HI Robyn,

            Happy to (try to) help!

            The script assumes that you’re running DEVONthink Pro as the Personal Edition is not fully supported for AppleScripting.

            Not sure why you’re receiving that error message and, since I don’t have DEVONthink 1.x on my system anymore, it’s not really possible for me to test. Can you tell me what kind of note you were trying to export? (i.e., a PDF, a text file, etc.).

            Since you’ve probably already downloaded and installed the DEVONthink beta by now, why don’t you use the original DEVONthink 2 to Evernote script to export into Evernote while you evaluate the new version? I believe that DEVONthink leaves the original version 1.x database intact when it converts it to the 2.0 compatible version — although, if you haven’t upgraded yet, you should probably back it up just in case my memory is incorrect! ;)

  4. Robyn says:

    Yes, it does work with the beta, which is pretty cool in and of itself :)

    Thanks again!

  5. vanderleun says:

    “Source code and down­load link on the next page!”

    The next page? Where is the next page? I can’t see any hint and the text above is not a link. Please clarify.

    Thank you

  6. vanderleun says:

    Never mind. Found it. Thanks.

  7. Lucas says:

    Hi Justin,

    thanks for the script, I’ve been using it for a while and it works great for PDF and RTF notes; the problem is that it doesn’t seem to work with HTML notes, I get a Growl notification saying that the export has been successful but the note does not show up in Evernote. Is it a known limitation? thanks for your help. Lucas.

    • Justin says:

      Lucas,

      It was a bug…. (I can’t believe that no one else reported this one!)

      Should be fixed in version 1.2 of the script — please download it and let me know if it works for you.

  8. Lucas says:

    that was quick!, tried it and it works!, one small detail though, if you copy the source directly you have an extra “(*” in line 01, and the script won’t compile.
    thanks a lot, this is really helpful.

  9. Twitter Comment


    To export your DevonThink items to EverNote easily, use this AppleScript! [link to post]

    Posted using Chat Catcher

  10. R Ratcliffe says:

    Devonthnk to Evernote not working for me. I get a notification – The variable theTags is not defined. Any way round this, thanks?

    • Justin says:

      Ah — the joys of everything not working when a beta goes final.. ;)

      I’ve worked up a quick patch for some tagging-related anomalies that were causing your error (see notes on Page 1). It is Version 1.21 of the script and is now available for download.

      Next stop — getting in touch with DEVON to let them know about it!

  11. R Ratcliffe says:

    Justin. Huge thanks and respect. Using the new (final) release of DEVONthink Pro Office 2.0 and the latest version of Evernote for Mac I can now send documents both ways. The two coolest notetaking/archiving applications are now officially talking to each other. Excellent work!

    • Justin says:

      FYI — Christian Grunenberg at DEVONtechnologies provided some code that will restore full tagging support, and I’ve updated the script to version 1.22 to incorporate his suggestion.

      For any other DEVONthink scripters out there having tag-related problems, he also says the following:

      The next release will fix [the tags] and the tags property will return an empty list/array instead of missing/undefined values in case of no tags.

      Let me know how it works for you!

  12. Mark says:

    You are my hero. I’ve been trying to find a way to transport over 20,000 files from DevonThink Pro 2.0 to EverNote and had almost given up. My only problem, however, is that I have a lot of formatted text (italics, colored fonts, etc) that are now gone. Is there any way to move the files and keep all formatting intact?

    Thanks!

    • Justin says:

      Hi Mark,

      Glad that the script was helpful!

      I am actually looking at ways of doing just that (Some of it is a function of how Evernote processes the text, however…).

      If it’s possible, I’ll make it happen!

      • Mark says:

        That’s great, Justin. I look forward to your updates. Thanks again for your help!

        • Mark says:

          Justin,

          I know you’re looking into ways of making the formatting work out, but if I were to hire you to write me a script to do just that, how much would it cost? I’m to the point that I would pay someone for a script that would make it possible to copy my DevonThink notes over to Evernote, but I want ALL formatting to be identical. I actually love both DevonThink Pro and Evernote, I just want to be able to have my notes on both programs and have them look the same. Is this something you would consider doing for me?

          Thanks,

          Mark

rss Subscribe to Comments RSS Feed


Trackbacks/Pingbacks

  1. Veritrope
  2. Connecting Evernote And DEVONthink With AppleScript | Veritrope
  3. Evernote to DEVONthink Export | Veritrope

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>