How to export book annotations from Kobo Touch


Highlighting text from the books you're reading is one of my favorite features in my very precious Kobo Touch. They are called "annotations" and unfortunately there is no obvious way to export these to your PC in case that you want to use them or save them. However, here I'll explain a not-difficult way to export your annotations to a file in your PC for later use.

Your Kobo has a database which saves information about the books you're reading, including the annotations your take. What we'll do is take the annotations from such database and save them in a file. Piece of cake. Here's what we do:

1. Let's find our database!

Connect your Kobo to your PC. Browse the content with your file browser and you'll see Kobo's folder: ".kobo", inside you'll find a file called "KoboReader.sqlite", that's our database.

2. Let's prepare our environment:

Create a new folder somewhere in your PC, I'll call it "Koboann". Copy the database KoboReader.sqlite from your Kobo device to this folder.

3. Get the program to read the database:

This database can be read with a small and very practical database engine called SQLite. Go here http://www.sqlite.org/download.html and download the procompiled binary (the executable) for Windows (or your OS whatever it is).

Unzip the file (sqlite3.exe in the case of Windows) in the Koboann folder.

4. Let's read the database and extract those annotations:

Create a new file and call it "work.bat", edit it and copy the following:

sqlite3 KoboReader.sqlite < extr_annotations.txt

Now create a txt file and call it "extr_annotations.txt" and copy the following:

.output annotations.doc
.separator "\r\n"
 SELECT VolumeID, Text, Annotation
 FROM Bookmark;
.exit

5. Final check and result: 

Now you must have 4 files in your Koboann folder:

Now double click work.bat and that's it! A file called annotations.doc will appear in the same folder with the annotation info you need.

--------

The original idea comes from the Kobo Reader forum in MobileRead forums (I can't find the exact post :s), I tweaked the parameters to fit my needs, feel free to add your own ideas and share them.

20 comments:

  1. I tried this on an ubuntu machine, I created a script equivalent to the batch file. It works. In the annotation.doc file there are still some lines to get rid of, they indicate the ebook location : "file:///mnt/***.epub"

    Thank you for this hint, it helped me.

    Funkychild

    ReplyDelete
  2. Can you post a link to how the export looks like or pint me to an example?

    ReplyDelete
  3. Brilliant! Thanks!

    ReplyDelete
  4. Thank you. That worked perfectly. Much Appreciated!!!

    ReplyDelete
  5. Fantastic, you're a mench.

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Hi,
    I can't get this system to work unfortunately. I struggle a bit to create the work.bat file. I ended up creating a notepad and then convert it saving it as .bat . I have the feeling this is not the right system, in fact when i double click it the annotation doc does not appear. Can anyone help me please?

    ReplyDelete
    Replies
    1. You're doing right. You can also create a work.txt and then modify the extension. Then, check that you have all the 4 files in the same folder and it works.

      Delete
  8. Genious! Work fine.
    Thank you for sharing this.

    ReplyDelete
  9. Works well. Is there a solution for marked pages as well ?

    ReplyDelete
  10. Wow, thanks so much. The new Kobo update does not work well with Calibre, and I was afraid I would lose all my annotations.

    ReplyDelete
  11. Thanks a lot! For me it works only with sqlite3.dll but that's no problem.

    ReplyDelete
  12. Thank you for your post! I used your method for some time. I would like to suggest a website that I just published, www.kobonotes.com. With Kobo Notes you can organize your notes easily, simply by uploading your .sqlite file. Your notes will be saved on the website and you can read them anywhere and from any device. Give it a try ;)

    ReplyDelete
    Replies
    1. Fantastic idea! I'm definitely going to give it a try, thanks for sharing.

      Delete
  13. ı could not do it. please can you share a turorial video

    ReplyDelete
    Replies
    1. I'm afraid I'm not good with cameras, did you try the website mentioned above? www.kobonotes.com - Maybe you can do it that way. Let us know if it works.

      Delete