Lately I had a lot of books to read, most of them technical in nature, but also some novels. While I did take speeding reading classes, I don’t always apply it, as I have different styles of reading a book based on its contents.
For example, when reading a novel or a narrative, I don’t apply any speed reading techniques, as I find they diminish the pleasure of reading. Authors spend months or sometimes years to create amazing worlds in the smallest details and skimming with fast eye movements over entire rows, jumping prepositions and connecting words transforms them into wastelands. I sometimes buy these books in paperback format.
But with technical books and articles is completely different. Here I don’t “read” per se, I “extract the information I need” and I *never* buy these books on paper. I always use my Kindle – well one of them at a time 🙂 – with a very large font that allows me to read an entire row in one or two fixations and I don’t stop to look for additional information or clarification if something pops up. If I find something that I need to review at a later date – like a library, a tool or an external article – I just highlight it and move on. When I’m done reading I review all these highlights in order to better comprehend the book.
I use Trello as a platform to organise tasks, as it’s proven to be very versatile, covering everything in terms of planning, from simple todo lists to arranging holidays with friends, so it made sense to import all my highlighted snippets here. Given that I’m a huge fan of automation, I can’t take into consideration manually creating 50-60 trello cards every 2-3 weeks. Takes for ever and it’s super boring. So I looked for alternatives.
Exporting from Kindle
Exporting the highlights from the Kindle is not the easiest task, as Amazon does not provide an API for this. There is a page – kindle.amazon.com/your_highlights – where I can see my highlights, but that’s about it. I did scrape pages before so I wasn’t scared of this, but I looked for alternatives first. And I found an amazing bookmarklet called Bookcision written in Javascript that allows me to download a json file with all my highlights. A bit of a manual step, but given that it takes less than 2-3 seconds, it’s okay. Moving on to the next step:
Importing the Trello
This shouldn’t have been hard, as Trello offers an API to manage cards, lists and boards, but given that it isn’t the best designed or documented API out there I did lose a couple of hours getting to work. The first thing I did was to create an API key here. The API key itself is not enough to use the API nor is it in combination with the “Secret” hash – which I have yet to discover what it’s used for. The application needs a token that can be generated by going to the following URL:
Getting the list id
According to the API docs, in order to create a new card, I need to issue a POST request to https://api.trello.com/cards with the authentication data, card title and a idList – yes, idList, not listId like any normal person would expect – to identify the list the card is supposed to go to. This list id is quite difficult to retrieve, since a GET to /lists will yield a 404 🙁
The easiest way is to create a card on that list, open the card with an URL like
1 |
https://trello.com/c/DcqBrqdx/1-target-card |
and add .json at the end:
1 |
https://trello.com/c/DcqBrqdx/1-target-card.json |
In the json file, I was able to find a idList key with the hash.
With this information, I created a file ~/.trello-kindle-config with the following content:
1 2 3 |
api_key = <api_key> api_token = <retrieved_token> list_id = <list_id> |
and then I used a small python script – available on my Github account – to create the cards. Usage is very simple, the configuration is read from the home folder so it takes only one parameter, the path to the json file:
1 |
python trekin.py /path/to/Bookcision-exported-file.json |
Happy reading 🙂
Most commented