Jump to content
  • 0

(Archived) integrate Evernote in Snow Leopard...


elldove

Idea

One of the great new features of Snow Leopard is the ability to create your own service using Automator, and to have that service show up in your contextual menu when appropriate. Attatched are two services to integrate Evernote into Snow Leopard's context menu.

TxtToEN will clip any text you've selected in just about any Cocoa application and clip it to Evernote. Just right click and it should be at the bottom of your context menu, or under Services. I can't check compatibility with every app. But it does work with Safari, Mail, TextEit, TextMate, NetNewsWire, Finder (if you select a file, hit return to rename it, and right click you can clip the name of a file), Stickies, Applescript Editor, Adium; It works in Pages, but for some reason Pages does not list services in its context menu, you'll have to access it from the menu bar under, Pages, Services. Carbon Apps like Firefox can't access these services. Right now TxtToEN is set to clip text to a notebook called "Text Clippings", To change this, open TxtToEN in Automator and change the second line of the Applescript. By default the title of your clippings will be "Clipped from APPLICATION NAME on the current date and time".

ImgToEN will clip any image you've selected. The service is set to work in any application, but I can only seem to get it to work in Finder. I haven't tried iPhoto. the default notebook is "Image Clippings". Change same as TxtToEN

LinkToEN will send any URL you've selected, and/or any link in Safari (or NetNewsWire if you use NNW), to Evernote which then adds the web page of that URL to your Evernote. Make sure if you have NetNewsWire or don't installed on your Mac that you install the corresponding version (both are included in the download zip).

install to /Users/YOU/Library/Services.

Go to System Preferences >> Keyboard >> Services >> find the service and make sure the box is checked.

TxtToEN.zip

ImgToEN.zip

LinkToEN.zip

post-16085-131906063906_thumb.jpg

post-16085-131906063908_thumb.jpg

Link to comment

35 replies to this idea

Recommended Posts

The system-wide nature of Services allows for some really interesting possibilities.... and I'm already beta testing some that have been adapted from the AppleScripts on my site!

Let me throw out an idea and maybe Dave or someone can tell me if this would be feasible in the future:

I've just published an "Amazon.com Search Service" that allows you to highlight some text and search for it inside a special preview window immediately on Amazon.com!:

SafariScreenSnapz001-300x142.jpg

http://veritrope.com/tips/services/amazon-com-search-service-for-snow-leopard

(Webpage has a short video to show how it works)

Wouldn't it be cool if there were a way to use Services to search through your Evernote items as well?

Could there be a way in the future -- perhaps via a properly-formatted URL -- to let an authenticated user search their notes and receive the results in a streamlined format?

For example, the web-clipper calls on a stripped-down "Quicknote" window, a la:

evernote-webclipper.jpg

Services like reQall are already doing this through their own integration, but I think that this could be very helpful for many of us to have available on the Service (or URL) level!

Just a thought...

Link to comment

You can certainly do it that way -- I'm testing a Services workflow that does so right now, in fact! (I'll release that very soon)

But I was suggesting that, as much as I love AppleScript, I feel like it's not quite the right tool for this job on it's own in this particular use case.

Instead, I think that Evernote's Mac users would benefit from also being able to view the results of a "find notes" function via a URL call to the Web Interface, not just via AppleScript -- and here's why:


  • [*:v0ylyqil]Here's a direct link to the clip that I mentioned in my previous message:
http://www.youtube.com/watch?v=A-nUfGIOMAQ
(... and, by all means, feel free to rock out to the Prefuse 73 Soundtrack while you watch the beauty that is an Automator Service using a Live Web Preview! :D )
You'll see how the "Live Preview Window" superimposes itself over the window you're in, lets you interact with the information, and then goes away when you're done. To my mind, this would be a great way to do a quick check of your Evernote data while not losing your place. I tend to think of things in terms of momentum.... too many steps away from what you were working on and, voila, you've lost focus. (Of course, I realize that everyone else may not be as easily distracted as I am!)
[*:v0ylyqil]When comparing the layout of the "Quicknote box" against AppleScript's Dialog Boxes, the AS boxes aren't exactly....um... aesthetically appealing. If you'd like, I could probably mock up a comparable "Quicksearch box" to juxtapose directly against the AppleScript results to demonstrate how I think Web with good CSS styling beats AS in this instance. But it's not just about "eye candy": I think that a cleaner, less intrusive layout equals better function in this case;
[*:v0ylyqil]Has the added virtue of being a cross-platform/bookmarklet-able solution...

You get the idea and, since the backend code for a fair amount of this stuff is already in in place, I thought I'd ask if it was something that the Evernote gurus were considering.

Link to comment

All good points. There is an Evernote API. Unfortunately its a bit denser for amateur's like me, vs some other APIs. I'm sure someone who can dig into can figure out the right curl syntax to make this happen.

If you can get a curl command together that can search and return results from your Evernote account, then creating a service would be a matter of sending the curl as shell script and popping up the return in the format of what you're talking about.

A third possibility: I've been playing with XCode in Snow Leopard's ability to create fully cocoa skinned applications using applescript. It's not too difficult. It might be possible to use applescript to query your evernote app, then use a cocoa HUD - style panel to display the results.

A fourth option, easiest to implement: we could use applescript to query Evernote.app and either export the results as HTML, if possible, or use applescript to turn the text results into an HTML format. HAve applescript save that file to /tmp/ensearchresults.html. And then, in automator, send the url file:///tmp/ensearchresults.html to the web pop-up automator function you used in your Amazon service. This might work pretty well, actually.

Link to comment

I had initially considered "Option # 4" and dismissed it, but I'm feeling more enthusiastic about it after reading your post... especially if we can sprinkle a little "Option #3" Cocoa goodness on top! :D

Until the Evernote gang says "More Web-based stuff is coming", I'm going to start playing around with some of these concepts... and I'll DM you later on Twitter with my contact info in case you want to make it a collaborative effort!

Link to comment

LinkToEN will send any URL you've selected, and/or any link in Safari (or NetNewsWire if you use NNW), to Evernote which then adds the web page of that URL to your Evernote. Make sure if you have NetNewsWire or don't installed on your Mac that you install the corresponding version (both are included in the download zip).

I'm sorry but I've never understood that last statement. Is the idea that if we have NNW installed we use that script, even if we aren't using NNW? I have NNW installed and am unable to get LinkToEN to work. "The action Run AppleScript encountered an error."

Link to comment
Would I gain anything by using this automator script?

Yes, you would gain the ability to do the same, only in any cocoa application. Not just Firefox and Safari, but TextEdit, Mail, Pages, NetNewsWire. And that's for the TxtToEN script. There's also the ImgToEN service with which you can right click on an image in the Finder and send that to Evernote. There's also LinkToEN service (posted here viewtopic.php?f=38&t=12218) that lets you right click on a URL in any application (for example, someone emails you a url to an article you want sent to evernote) and have Evernote download the article.

The firefox web clipper is great (though I'm a safari man myself), but these Services extend clipping system wide.

Link to comment
doesn't Evernote for Mac already provide a shortcut to paste from clipboard? (cmd-ctrl-V)

This script is supposed to allow you to skip the step of loading the web page in the browser. You send the URL only and EN creates a note with the web page and source URL field populated. It has never worked for me, ergo, my above question.

Link to comment

LinkToEN will send any URL you've selected, and/or any link in Safari (or NetNewsWire if you use NNW), to Evernote which then adds the web page of that URL to your Evernote. Make sure if you have NetNewsWire or don't installed on your Mac that you install the corresponding version (both are included in the download zip).

I'm sorry but I've never understood that last statement. Is the idea that if we have NNW installed we use that script, even if we aren't using NNW? I have NNW installed and am unable to get LinkToEN to work. "The action Run AppleScript encountered an error."

I have NetNewsWire installed as well and get the same error as you do, so not sure what is going on. Did you ever find the answer?

Thanks,

Mark

Link to comment

Firstly , this is great and gets around the current Safari5.1 issue and bypasses that intrusive Chrome- plug-in. So thanks to the author.

But to those who cant get it to work there are two issues that I had to get through:

With LinkToEN

Firstly In found that the version with the NNW option come up with script errors – I mean the script wont even compile in AppleScript editor until the NWW if/then clauses are removed.

So I wonder for starters if it is better not to use that one and get the other none NNW version running.

Secondly, after the first time I ran it the default EN notebook was set up but seemed to have a null value. If this happens you'll get an error.

So, open the service file in Automator and change the line

create note from url inLink title enTitle notebook enNotebook

to

create note from url inLink title enTitle notebook "work"

where " work" is the name of your default notebook.

You can test the syntax of the original script in AppleScript Editor by pasting it in to an empty document and pressing compile. If it compiles save it back into the Automator doc and save. Then it should run.

Hope that helps

Link to comment

It works for me. Have you tried to reinstall the latest Evernote build

maybe? I am running the latest code 2.2 beta 1 build 147280 and it works on

both machines I use.

The only thing is, I still run 10.6.6, I had some big problems when I

updated to 10.6.7 so I returned to 10.6.6.

The latest 2.2 code of Evernote has finally added hyperlinks to Evernote

notes, so now it is possibile to link Evernote notes into Omnifocus, like

we've been able to do for a long with email and Mailplane. Pretty cool

stuff! :)

Link to comment

The instructions are very clear.... place the contents of the zip file into the services folder and then it will be available with the right click context menu. You simply clicked on the workflow itself which will open up in Automator... the directions were explicit if you would just read instead of doing on your own.

Link to comment

no actually, the snag came initially because i couldnt' find the services folder under /Users/YOU/Library/Services. so i thought it was something that i could trace back by double clicking the attachment, and trying to figure out where automator was going to save it to.

after digging around manually, it was under /System/library/Services.

so now it works, and it rocks! thanks Elldove

Link to comment

"install to /Users/YOU/Library/Services.

Go to System Preferences >> Keyboard >> Services >> find the service and make sure the box is checked."

I can't find the Services folder..and I went to System Pref/Keyboard/ and I din't find Services....I do have Snow Leopard.....any suggestion?

Link to comment

I can't find the Services folder..and I went to System Pref/Keyboard/ and I din't find Services....I do have Snow Leopard.....any suggestion?

If the /Users/YOU/Library/Services folder doesn't exist, just go ahead and create the Services folder in that location. You can place the automator scripts there and they should then work fine.

Link to comment

I'm a noob, but when I select text in my browser and right-click I see "Add to Evernote." I have not installed this automator script. I assume this functionality is from the Firefox add-on "Evernote Web Clipper." Would I gain anything by using this automator script?

Link to comment

Good idea. Attatched is a zip containing versions of the services which do just that. Make sure you're using the most recent Growl 1.2 beta in Snow Leopard.

update: the bug described below by ashlar 77 is fixed in v 2.1 (see next post by me). use that.

Link to comment

Thank you!

However, this version needs some work - many times that I use it I get the error "The action Run AppleScript encountered an error".

I get this in particular with formatted text, it seems. One place where it is 100% reproducible is on the growl beta page:

http://growl.info/beta.html

HIghlight the red bar with bold upper case text: IMPORTANT: RUN 1.2b3'S GROWL AND GROWLMAIL....

and run the Service and you will see the error.

When the Service works, it works great! Thanks very much for implementing my suggestion.

Link to comment
However, this version needs some work - many times that I use it I get the error "The action Run AppleScript encountered an error".

Fixed. Requires Growl to be installed. (since this all assumes Snow Leopard be sure to use the most recent version. As of this writing that's 1.2 beta3).

Download this instead:

[attachment=0]ENclipServices2.1.zip[/attachment]

This is brilliant. Thank you.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...