Latest in Api

Image credit:

The ever-extensible Evernote


Evernote, a versatile (and oft-mentioned) note-taking application for Mac and iPhone (as well as Windows and other mobile platforms), has recently opened up a Service API. This comes as an intriguing extension to the basic AppleScript support found in the 1.1.5 release, and opens up the possibility of creating homegrown interfaces ranging from simple calendar/todo managers to "thick" clients which can manipulate the entire collection of Evernote data.

The AppleScript library itself is quite useful, albeit slightly limiting. You can retrieve lists of notes based on searches, create new notebooks and notes from a variety of sources, and obtain properties for the various elements of Evernote. The most interesting feature of the AppleScript library is the import/export automation capability. You can export (in well-formed XML) entire notebooks, or notes from a list (such as one generated by a search). These can be transported automatically by whatever means work best for your purposes, and then imported on the other end. This, to me, is primarily interesting because it allows for "local" synchronization of large libraries without using up online quotas. It's also ideal for automatic backup of your notes, among other potential applications: a recent MacOSXHints tip shows a means of adding notes to Evernote via Quicksilver, complete with notebook, title and tagging syntax. Open the Evernote dictionary in Script Editor for the full set of definitions.

The AppleScript library lacks the ability to add tags to existing notes, move notes or delete notes and notebooks. These functions can, however, be found in the Service API. I'm waiting on an API key today, but I'm looking forward to exploring the possibilities for both desktop and web applications. Libraries for the API are available in Java, Perl, PHP, Python and Ruby -- along with sample code and documentation -- at the API overview page.

The last thing I'll mention is the query syntax, which can be of as much use in the Evernote search bar as it is in an AppleScript or API call. I hadn't fully realized the extent of the search grammar until I read the API documentation. For Evernote users who haven't explored this, it's a very effective way to build searches quickly without a lot of token-clicking. You can start with the basic tag syntax: tag:"tuaw", which will find every note tagged with "tuaw." Prefix it with a minus sign (-tag:"tuaw") to ignore any result with the "tuaw" tag. Combine multiple search parameters for boolean searches; the default search is "all", requiring the results to match every parameter in the string (AND), but you can prefix the query with any: to make it an OR search. Other possible parameters include created: and updated: (which respond to some natural language dates as well as a compact profile of ISO 8601), intitle: (search only in the titles of notes), as well as terms for narrowing to a specific notebook or querying just about any attribute of a note (latitude, longitude, altitude, author, source, etc.). See section C of the API docs for a full description of the search grammar.

It's great to see such a useful application continuing to expand itself and allow for third-party interaction. If you're interested in developing around Evernote, or just playing with the possibilities, stop by the developer page and take a look around.

From around the web

ear iconeye icontext filevr