Export notes and highlights from Kobo devices


Acknowledgments, donations, etc.
If you enjoyed reading this page or using my extraction script, you can send me a "thank-you" email.
If you really enjoyed this work and you feel really grateful to me for writing the extraction script, I would really love to receive a (reasonably recent) 9-inch e-reader or tablet for testing purposes.
If you really really enjoyed my work on this project and you think my brain can help you, I am always glad to hear about job collaborations!
In all three cases, contact me via email, thanks!
 
Abstract
In this page I describe a Python script to export notes and highlights from Kobo eReaders. The script comes in Python 2.x and Python 3.x version, and it works under Linux, Mac OS X and Windows.
Comments are welcome, especially if you point out mistakes or you have useful suggestions: just drop me an email.
I do not assume any legal liability or responsibility for any damage, data loss or inconvenience that you might cause to yourself or to other people by following the procedures below. RTFM, first.

Download
To get started, please install Python 2.x or Python 3.x on your system. You can download it from free from http://www.python.org.
For your convenience, add the Python executable (python or python.exe) to your PATH environment variable.
Next, download this script (Python 2.x) or this script (Python 3.x).

Script usage
First, copy the file KoboReader.sqlite from your Kobo device in the same directory where you downloaded the export script. You can find KoboReader.sqlite in the hidden .kobo directory of the USB volume that pops up when you connect your Kobo to your PC via the USB cable.
Then, open a terminal, go to the directory mentioned above, and issue the command:
$ python export_Kobo_notes.py [ARGUMENTS]
The available arguments are:
  • -h, --help : print usage message and exit
  • -f, --file FILE : FILE is the path to KoboReader.sqlite
  • -c, --csv : output CSV values, tab-separated, instead of human-readable strings
  • -o, --output FILE : write output to FILE instead of standard output
The order of the parameters is irrelevant.
Examples (use export_Kobo_notes_3.py instead of export_Kobo_notes.py if you have Python 3.x installed):
  • $ python export_Kobo_notes.py -h
    Print usage message and exit
  • $ python export_Kobo_notes.py -f KoboReader.sqlite
    Print annotations and highlit passages in human-readable form
  • $ python export_Kobo_notes.py -f KoboReader.sqlite -o output.txt
    As above, but output to file output.txt
  • $ python export_Kobo_notes.py -f KoboReader.sqlite --csv
    As above, but output in CSV form (to standard output)
  • $ python export_Kobo_notes.py -f KoboReader.sqlite --csv -o output.csv
    As above, but output to file output.csv (you can easily import it in any spreadsheet program)
Links