Evernote plugin

88 views
Skip to first unread message

Andreas Johansson

unread,
May 16, 2013, 1:06:07 PM5/16/13
to quicksilver---development
Hello again

This one has been a long time coming :) I think I'm actually ready for a release of my Evernote plugin. Repo is here: https://github.com/ndreas/Evernote-qsplugin and a debug build can be found here: http://cl.ly/0S2a0i3s1t1Z. I'll build a release if you think everything checks out fine.

A few notes about the code:

Evernote's AppleScript/Scripting Bridge interface is really bad. You can't do much and the stuff you can do is quite buggy. Much of what I need to do has do be done via Evernotes search syntax, which thankfully is quite powerful. This however means that you for example get different views if you open a notebook in the app or via QS.

The biggest bug is that you can't from Scripting Bridge do anything with a window's query field. Due to this I've had to resort to embedded AppleScript within the plugin, from which it works. The reason is that the query string only exists on EvernoteCollectionWindow, and all you get in Scripting Bridge are generic EvernoteWindows. Casting is not possible, Scripting Bridge does not recognize the type EvernoteCollectionWindow.

For further details, see the docs. I appreciate any feedback you have.

// Andreas

Rob McBroom

unread,
May 29, 2013, 10:46:16 AM5/29/13
to quicksilver-...@googlegroups.com
On May 16, 2013, at 1:06 PM, Andreas Johansson <and...@stdin.se> wrote:

This one has been a long time coming :) I think I'm actually ready for a release of my Evernote plugin. Repo is here: https://github.com/ndreas/Evernote-qsplugin and a debug build can be found here: http://cl.ly/0S2a0i3s1t1Z. I'll build a release if you think everything checks out fine.

Finally got a chance to look at this. Looks pretty nice, considering the limitations you were stuck with. Here are some things I noticed:
  • It looks like there are some comments unmodified from the Chrome plug-in.
  • You should assign a default precedence greater than 0 to the actions for notes and notebooks. This will put them high on the list by default, but since they don’t apply to any other types, you can effectively make them the defaults for Evernote types without interfering with anything else. You can also assign them different values to control the order they appear in. The user can always override these choices later by dragging things around in the prefs. See Remote Hosts for an example.
  • Would it be possible to add the contents of the note as QSTextType for each note object? That would allow a user to use actions like Paste and Large Type directly on a note.
  • Could children be pulled from the catalog instead of from the application in real-time? This would make them available when Evernote isn't running (assuming they were scanned in and created at some point).
  • Were you not able to parse the stuff in `~/Library/Containers/com.evernote.Evernote/Data/Library/Application Support/Evernote/accounts/Evernote` to scan without having to run the app?
  • What about browsing by tag and possibly adding tags to the catalog?
  • Open notebook creates a new window, but shows the same notebook as an existing window instead of the one selected in Quicksilver.
That should give you plenty to think about for now. :-)

-- 
Rob McBroom
<http://www.skurfer.com/>

Andreas Johansson

unread,
May 29, 2013, 2:19:31 PM5/29/13
to quicksilver---development
2013/5/29 Rob McBroom <mailin...@skurfer.com>
Thanks for the feedback. I'll take a look at this during the weekend and hopefully I'll be able to address most of it.

Of the top of my head though, I think the last point might be a limitation with the feeble scripting interface. I think it does that if you have a search active in an existing window, and I mention it in the documentation, though it seems I accidentally a few words there. I'll fix the docs.

// Andreas

stuartro...@gmail.com

unread,
Jun 10, 2013, 7:49:13 AM6/10/13
to quicksilver-...@googlegroups.com
I'll happily help text this as user. I've installed the development build and am trying it out. I used the Remember the Milk plugin previously which was/ is very straightforward.

/Stuart

Andreas Johansson

unread,
Jun 10, 2013, 8:14:35 AM6/10/13
to quicksilver---development
I'll happily help text this as user. I've installed the development build and am trying it out. I used the Remember the Milk plugin previously which was/ is very straightforward.

/Stuart

That's great to hear Stuart, I appreciate any help I can get. Haven't gotten around to fixing Rob's points yet, the weather has been too nice here to sit inside :)

If you find anything that's wrong, either report it here or at the issue tracker here: https://github.com/ndreas/Evernote-qsplugin/issues

// Andreas 

Andreas Johansson

unread,
Oct 1, 2013, 1:12:42 PM10/1/13
to quicksilver---development
So, I have finally gotten around to fixing most of Rob's points. The major stuff I have added is reading objects from the catalog if Evernote is closed, and support for tags. I also fixed the annoying bug in Rob's last point.

I have looked at adding the content of notes as QSTextType, but unfortunately you can only get the content as either ENML or HTML, which I feel is rather pointless to expose to the user. Whitespace is stripped in the stuff that comes via Scripting Bridge, so in order to get something similar to what you would get if you copy the content from Evernote, you'd need to render the HTML, which I haven't managed to find a solution for.

I took a quick look at parsing data from the file system, but that seems to be more complex than working with the AppleScript interface. The content is there, but I can't find any id connecting the p* folders and the notes, so it feels like a low priority thing to implement.

I think the current state might be releasable as 1.0. I have a few other ideas I'm going to look at, but that could wait for a 1.1 release.

What do you think?

// Andreas

Rob McBroom

unread,
Oct 8, 2013, 10:27:21 AM10/8/13
to quicksilver-...@googlegroups.com
On Tue Oct 01 2013 at 13:12:42, Andreas Johansson wrote:

I think the current state might be releasable as 1.0. I have a few other ideas I'm going to look at, but that could wait for a 1.1 release.

What do you think?

After some very light testing, I think it looks pretty good.

Something else you could do to make catalog scanning a bit more automatic is have the plug-in watch for Evernote to launch and trigger a rescan of the catalog entries immediately (instead of waiting for the next scheduled run). I think all you’d have to do is call:

[[NSNotificationCenter defaultCenter] postNotificationName:QSCatalogEntryInvalidated object:@"QSPresetEverNoteGroup"];

But maybe you want to save that for 1.1. Anyway, I’m fine with releasing it as is, so let us know what you want to do.

Patrick Robertson

unread,
Oct 8, 2013, 11:10:26 AM10/8/13
to quicksilver-...@googlegroups.com
I'm sorry I never got back on the lazy loading of data business. It's definitely something I think we should implement across the board (see my post a few messages back for how I thought of implementing it). Perhaps when we/I do, you could lazy-load the note… but it seems like this is a no-go anyway (what with it not being plain text), so everything looks good as they are

--
You received this message because you are subscribed to the Google Groups "Quicksilver - Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quicksilver---deve...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Andreas Johansson

unread,
Oct 8, 2013, 2:13:08 PM10/8/13
to quicksilver---development
I think it's a good idea (and way past due) to get something out to the users, so I'll build a release version tomorrow and make it available to you. I'll actually add it to my Remember the Milk list, so I won't forget :)

I'll add the automatic scan to 1.1 along with a few other ideas I'm considering.

// Andreas

Andreas Johansson

unread,
Oct 9, 2013, 11:37:07 AM10/9/13
to quicksilver---development
And here is the 1.0.0 release: http://cl.ly/0B062H3Z1g2M

// Andreas


2013/10/8 Andreas Johansson <and...@stdin.se>

Rob McBroom

unread,
Oct 9, 2013, 1:59:21 PM10/9/13
to quicksilver-...@googlegroups.com
On Wed Oct 09 2013 at 11:37:07, Andreas Johansson wrote:

And here is the 1.0.0 release: http://cl.ly/0B062H3Z1g2M

OK, I’ll get it published.

Anything you want to say in the release notes other than “see the documentation for details”?

Andreas Johansson

unread,
Oct 10, 2013, 3:16:47 AM10/10/13
to quicksilver---development
Sorry, I missed your reply yesterday. No I think the documentation will suffice.


2013/10/9 Rob McBroom <mailin...@skurfer.com>

Rob McBroom

unread,
Oct 10, 2013, 9:54:43 AM10/10/13
to quicksilver-...@googlegroups.com
On Thu Oct 10 2013 at 03:16:47, Andreas Johansson wrote:

Sorry, I missed your reply yesterday. No I think the documentation will suffice.

It’s been released. Thanks for yet another contribution.
Reply all
Reply to author
Forward
0 new messages