View Full Version : Yet Another Kindle Clippings - Evernote Exporter


curroergosum
04-08-2012, 07:34 PM
Hello,

The short:

javascript:(function(){var jsCode=document.createElement('script');jsCode.set Attribute('src','http://klipletklipper.appspot.com/scripts/kliplet3-export.js');jsCode.onload=initparseClippings;docum ent.head.appendChild(jsCode); function initparseClippings(){startClip(); } }());

Kliplet, Javascript bookmarklet to export your My Clippings.txt file to evernote ENML format, ready to import.

Instructions: 1. Copy the above code and save it in your browser as a new bookmark (or visit klipletklipper.appspot.com (http://klipletklipper.appspot.com) for a link that you can drag to your bookmarks bar)

2. Plug in your Kindle; Browse to the 'Documents' directory on your kindle and find the 'My Clippings.txt' file; Drag the file to an open Chrome/Firefox window.

3. Click on the bookmarklet link. A page should load with a link 'Click to download'. Click this link to download the Evernote export file.

4. Open Evernote desktop, click File->Import->Evernote Export Files...; Choose the file you just downloaded and click Open.

Only tested using Kindle 3/Keyboard (old generation) and latest versions of Firefox/Chrome/Evernote Desktop under Windows. Use at your own risk. You might want to make a backup of your My Clippings file first although I can't think of any way that this would actually do the original any harm.

Explanation

I've benefited from this forum a great deal over the last year that I've owned my Kindle, but never registered or posted. So I thought I'd share a Kindle-based project I put together recently while learning Javascript, let me know if there is a better place for it.

The default 'clippings' experience in the Kindle is extremely lame; searching and browsing on the device is slow and often crashes in my experience, and there's no streamlined off-device way AFAIK to do simple things like browse, delete, tag, export, etc. Of course there is kindle.amazon.com, but that only works for content purchased from Amazon, and I read a great deal of non-Amazon content (for example, annotated Polish classics from the great Wolne Lektury (http://wolnelektury.pl/) website).

I guess a lot of other people feel the same way, which is why there are so many great free scripts and programs for exporting and doing other interesting things with Kindle clips (here are the ones I know about: Kindle Clippings Organizer (http://www.mobileread.com/forums/showthread.php?t=150565&highlight=kindle+clippings), this project (http://www.mobileread.com/forums/showthread.php?t=140685&highlight=kindle+clippings), this Python script (http://www.jplattel.nl/kindle-notes-evernote-sync/) -- any others feel free to point out in this thread or let me know to add here). There is also one website that is quite suspiciously heavily promoted on all sorts of forums like this and that requires registration to do anything. I have no idea if it is good or a scam, so I won't put a link here.

The most straightforward solution to resolving the Kindle's inadequacies in organizing notes is to export them to some other program that is good at organizing/sharing/etc. It seems the most widely used multiplatform note program out there is Evernote, so I decided to start with a simple script to export the entire Kindle My Clippings file to a format that can be imported into Evernote. I thought a Javascript bookmarklet would be a nice, accessible approach to this (your average user might not have Python or Java installed, but most everybody has access to a Javascript-compatible browser). I wanted to squeeze all the code into the bookmarklet so it worked offline, but couldn't quite get that to work, so right now it simply loads a script from a Google Apps Site I created (klipletklipper.appspot.com) (if you want offline access you can download the linked filed and change the bookmark accordingly).

The mechanics of the script are real simple, just parse the My Clippings file using a few regular expressions, generate an output file in the Evernote XML format, and serve up the file in the form of a URI link. I based the format for the Evernote XML on an export generated by the latest version of the Desktop software running under Windows; there are some language/platform specific tags, so I'm interested in whether it will import correctly on other platforms.

As mentioned above, I'm using this as a practice project while I learn various web technologies, so I will be expanding/improving on it as I learn. My thought is that while most power users probably just want to plug their Kindle clippings into all the other services they use, some casual users might just want a friendly, convenient way to browse their notes, organize them, format them nicely and print them out / export them to PDF/Doc. I've got a rough draft of something like that and will post it here / the google apps site soon. EDIT: rough draft of DeLuxe version now on the website, http://klipletklipper.appspot.com/.

Please test out the bookmarklet, report any problems, and offer any suggestions to improve it or of features you would like to see in any future development.

Cheers!

belier1988
05-04-2012, 10:11 AM
Thanks for your effort! I've been looking for this kind of exporter to evernote.
But it's not working on my mac with Safari 5.1.5...:chinscratch:
With the text file opened in Safari, click on the bookmarklet link nothing happens.
Click with a normal webpage(google,..) a download link appears with nothing to download.

sirmaru
05-04-2012, 10:38 AM
You don't need any tricks to access your clippings easily. They are all conveniently stored for you at the following link:

https://kindle.amazon.com/your_highlights

curroergosum
05-04-2012, 11:29 AM
I've only tested it under Chrome, so you're best bet is to try it there. I'm not at all familiar with Safari -- is there something like the Chrome 'inspect element' or Firefox FireBug feature that will let you know where the JavaScript failed, and any errors that it sent out? It shouldn't work at all when clicking the bookmarklet on any page other than the My_Clippings.txt file open in the browser, so that's not surprising.

But if you're on a mac you should probably check out this Python script - https://github.com/vindia/kindle-2-evernote. If that 'automator' workflow works it even syncs automatically, which is super cool.

@sirmaru While the Amazon highlight page is nice, as far as I know it only works for books purchased from Amazon. As mentioned above, a great deal of what I read is not from Amazon, and I imagine I'm not alone, judging by the popularity of Calibre -- which doesn't have much of a purpose if everything you have is from Amazon -- among Kindle owners.

But overall I am very aware that this is far from an original idea. I did it mainly as a learning project, and decided to share it because I didn't quite see any exact equivalent -- a no-install, cross-platform way to do something useful with your notes. Hence the beginnings of an Evernote-free version to let you browse, print, email, save etc. from the browser. If there is actual demand for something like it I'm willing to try to make it more streamlined and/or actually work :)

Personally, I've stopped using this method, and am interested in something that fits more smoothly into my workflow, either a PC version of an automated sync daemon or some sort of calibre plugin, or ideally a way to sync the highlights from non-Amazon sources to a place of my choosing (email, Evernote, plain text, blog post etc) directly from the device, a la the official Amazon method.

Thanks for your effort! I've been looking for this kind of exporter to evernote.
But it's not working on my mac with Safari 5.1.5...:chinscratch:
With the text file opened in Safari, click on the bookmarklet link nothing happens.
Click with a normal webpage(google,..) a download link appears with nothing to download.

thomass
05-04-2012, 04:45 PM
But it's not working on my mac with Safari 5.1.5...:chinscratch:
With the text file opened in Safari, click on the bookmarklet link nothing happens.
this may help:

Hey, it does actually work in Safari with JavaScript debugging on...
Via Developer toolbar...

idoit
08-27-2012, 04:09 PM
You don't need any tricks to access your clippings easily. They are all conveniently stored for you at the following link: https://kindle.amazon.com/your_highlights

I guess this URL shows only the highlights for books you've purchased from Amazon (i.e. Amazon eBooks), am I right? Because for me it shows just 1 highlight!!!

vxf
08-27-2012, 06:02 PM
I guess this URL shows only the highlights for books you've purchased from Amazon (i.e. Amazon eBooks), am I right? Because for me it shows just 1 highlight!!!

If you side-load books, then they won't sync - the highlights will not be there and you won't be able to sync 'last page read' across devices.

I believe there is a way around that - if you email the book to your kindle. I have not tested it (I don't use my KT much lately) but, from what I read, if you email the book to yourself then it is added to the 'Kindle ecosystem'.

It would, however, be nice to hear from someone why has tried this out.