Evernote to MacJournal AppleScript

The latest version of this script can now be found in the Veritrope.com Code Library!

15 Responses to “Evernote to MacJournal AppleScript”

  1. lem October 9, 2009 at 7:54 am #

    MANY thanks !!! !!! !!!

    • Justin October 9, 2009 at 10:22 am #

      Hey — what can I say — I’m a fan of enthusiasm! 😉

  2. bryan February 11, 2010 at 3:09 am #

    Thank you very much for this script.

    I tried running the script (version 1.0.1), and was able to transfer some entries from Evernote to Macjournal, but many of them would give me the following error:

    Can’t get item 1 of {}

    Also, I can’t edit any of the entries that are transferred to Macjournal. I checked to see if the entries were locked, but they the inspector says they are “editable”.

    Also, the transferred entries do not maintain formatting, such as bullets, line breaks, etc.

    Any suggestions?

    Thanks again!

  3. Justin February 19, 2010 at 1:46 am #

    Okay — here’s the latest update (and a question for everyone out there using the script):

    Editing Your Notes:
    Dan Schimpf (the developer behind MacJournal) and I have been trading some emails about the editing issues.

    The problem boils down to this — I wrote the script to convert the HTML files that Evernote exports into a slightly different format called a “Web Archive” — and MacJournal doesn’t edit that format (yet).

    Essentially, a Web Archive is a bundle of all the HTML code…plus any images used in the page. I chose this route so that the notes would arrive in MacJournal looking roughly the same as they did when they left Evernote. (Thought that might be important to you all! 😉 )

    That said, I can make a simple change in the script that would import the notes as RTF files. This would allow you to edit them, but you may lose some formatting and images in the process.

    Dan is looking into some options to enable Web Archive editing within MacJournal (the best of all possible solutions) but, in the meantime, here is my question to you all:

    WOULD YOU PREFER:

    • Notes that you can edit — even if they lose some of the formatting/images along the way?
    • “READ ONLY” notes that keep much of their formatting
    • An additional dialog box that lets you pick between the two

    Can’t get item 1 of {} Error:
    Haven’t been able to reproduce that in the latest build of the script. If you get it again, try emptying the trash and repeat the export. Either way, let me know if this happens again and I will do my best to get to the bottom of things!

    • bryan February 19, 2010 at 2:07 am #

      Hello Justin,

      Thank you for tackling this problem!

      My vote is for the third option: “An additional dialog box that lets you pick between the two.”

      I use these journals for a variety of tasks; certain entries favor the first option, others favor the second option. So the third option would give me more control.

      As for the “Can’t get item 1 of {} Error:” – I noticed that it happens more consistently when I try to transfer numerous entries at once (like ten or more). Sometimes, the error indicates it can’t get a certain entry (out of several), but if I selected it individually, it works.

      Thanks again for the help!

  4. Justin February 25, 2010 at 1:22 am #

    For now, I’ve decided to bundle two scripts into a ZIP file instead of writing the dialog box: One is identical to the 1.01 release except for being renamed the (READ ONLY) script. The other will create RTF files that you can edit inside of MacJournal and is named (EDITABLE).

    Let’s see if MacJournal makes any changes in how it handles Web Archives in the near future and will potentially try to release a “unified script” again if conditions allow.

    Hope you enjoy!

    • bryan February 25, 2010 at 6:02 am #

      This is great! It works perfectly!

      Thank you!

  5. Dale Francum March 2, 2010 at 4:29 pm #

    Justin,

    This is great, really nicely done. Thanks very much.

    In case this is helpful to anyone else, I like to tag the notes I import, so I added this line to your script in two places:

    add tag "Evernote import" to resultObject

    This is placed after the two blocks containing this code:

    repeat with noteTag in noteTags
        add tag noteTag to resultObject
    end repeat

    Dale

    • Justin March 2, 2010 at 5:46 pm #

      Dale,

      Thank you very much for the kind words and — what’s more — for taking the time to roll up your sleeves and make the code better. This is exactly the spirit I’ve been working to create here at Veritrope.com! 😀

      In fact, your contribution reminded me of something that I had meant to ask Dan Schimpf (MacJournal’s Developer): “Any plans to make tags readable and writable via AppleScript?”. As it stands, they aren’t — but if you use any one the other Evernote scripts here, you’ll know that I’ve already developed a fairly solid “tagging subroutine” that I could drop into this script in a matter of minutes (were AppleScript support for tags in MacJournal to be enabled).

      Anyhow, I’ve emailed Dan and, once I hear from him, I’ll pass along his response if anyone here is interested…

  6. Keizo January 3, 2012 at 1:12 am #

    I tried this scripts on Evernote 3.0.6 Beta 1 (214012) and MacJournal 6.0.1. Unfortunately it didn’t work. I had the dialog which is bellow.
    https://img.skitch.com/20120103-pixeys4btncje4ys8efy4qn8b.png

    Is it possible to fix it ?

  7. Mark B. March 13, 2012 at 9:24 am #

    I’ve tried to do this on Evernote Version 3.0.6 (221382). I have a lot of notes to migrate (about 1000) and a fair number of them have embedded PDF’s. My observations are as follows:
    1) Text notes migrate without issue
    2) Notes with text and pictures will migrate without issue
    3) Notes with a mixture of text and embedded PDFs will migrate, but only the PDF will show up in the MacJournal note; the text is lost

    Is this expected behavior?

    Note that when I create a new MacJournal note, I can add text and then drop in PDFs without an issue (as you would expect to be able to do).

    • Justin Lancy March 13, 2012 at 11:22 am #

      Hi Mark,

      Looking back through the code, I think it’s a glitch… and in any event, it certainly isn’t a desirable result! 😉

      Not sure if and when I’ll be able to take a closer look, though:
      I’m not a MacJournal User, so I used a trial version to quickly develop this script for people who wanted to move their notes into it. That trial has expired, so I’ve recently sent some Twitter messages to ask Mariner Software to provide a Developer’s License so I can maintain this script. So far, I haven’t heard back — but if they do, I’ll take a look and see if I can adjust the script to capture both the PDF and the text. (You can contact them as well if you’d like!)