TL;DR: Adios Evernote and thanks for the export function: that works well.
Just a few days after originally installing Evernote I started getting upset with it, and that state of mind hasn’t changed since. The last straws fell a few weeks ago when I sent it the nth dozen e-mail which bounced with a message to the effect that basic users are entitled to three mails only. Then noticing close to 1800 notes on the Mac but 532 only on iOS killed it for me. I needed something else.
Whining on Twitter didn’t really help, but Martin Schmitt pointed out that Apple’s Notes app (iOS and OS/X) use IMAP as storage and had I thought of that? I hadn’t, but a couple of hours later I’d figured out which IMAP headers were required to have an IMAP message show up in both iOS and OS/X (they behave differently), and I created a dirtyish program addnote.py which stores a new note in IMAP.
It’s actually pretty yucky: Apple’s notes require HTML (what’s wrong with
text/plain? They also require a
multipart/related content type, and what I find pretty awful is that the first line of the body is turned into the note’s title; change that later, and the Subject of the message changes!
Anyway, the result of above message in Notes (iOS, left) and Notes.app (OS/X, right) looks like this:
Images are visible in both clients, but other attachments can only be used on OS/X. By “used” I mean I can double-click on the attachment to launch its default application, but I can’t right-click to download or something. (I wonder what the creators had in mind when they didn’t implement that…)
Accessing the IMAP store with Mutt is also possible:
Import the export
Next up came reading the Evernote export which is either in an XML format called “Enex” or as HTML. I chose the latter, because notes with attachments are dumped in a file called
note title.html and its attachments go into a directory called
note title.resources/. This simplified my life a bit.
Reading the HTML and grabbing the files is easy. I parse the HTML to find the note’s creation date to set as IMAP message date, and a few other bits and pieces. Converting the 1800 messages to Apple’s Notes format and storing them in the IMAP store took just a couple of minutes. Done.
I frequently send an e-mail which I want converted to a note. I do this when at a customer site, for example.
Nothing easier than that, I thought. I wrote easyIMAP2Notes.py which connects to an IMAP server, reads the Inbox folder, converts the messages found there including attachments into Notes format and drops them into an IMAP server in the
So far, so good, even though this is still in proof-of-concept mode. I can live with Notes.app on iOS and OS/X even though these utilities are pretty minimalistic. Instead of tags I organize notes into folders. Admittedly the search capabilities are way under those of Evernote, but they suffice for me.
The “sync” part works only when the clients are restarted – they don’t appear to support IMAP
IDLE. If I delete a note on iOS, I might have to relaunch the OS/X for the deletion to become visible. This happens after an hour or so of idleness.
It’s a bit late to cry over spilled milk, but I have now un-clouded my notes even though I do wonder how many copies are lying around in some cloud drive space. The IMAP store is under my control (and that of the NSA), I can back that up at will (e.g. with getmail or offlineimap), and a future export of notes, if required, will be easy.
All in all a workable solution for me, at least for the moment. Thank you Martin.
As Tony rightly says: > It is worth pointing out that the new features of notes on iOS 9 including finger painting and tickyboxes only work if your notes are stored in iCloud. Which is frankly lame because these things are easily expressible in HTML and easily bundled in MIME and stored on IMAP.