Giter Club home page Giter Club logo

kobo-annotations-exporter's Introduction

kobo-annotations-exporter

Export your annotations from your Kobo device into docx files and more !

  • Developer: Thomas Galvaing
  • License: the MIT License (MIT)

Install

Make sure you have Python3 (3.7 and above) and pip on your machine :

sudo apt install python3 sudo apt install python3-pip

Then : pip3 install -r requirements.txt

Plug you Kobo and localise the sqlite file (usually named KoboReader.sqlite)

Usage

$ # print annotations in stdout
$ python3 kobo-annotations-exporter.py KoboReader.sqlite

$ # print annotations in docx files
$ python3 kobo-annotations-exporter.py KoboReader.sqlite --format word

$ # print annotations in text files
$ python3 kobo-annotations-exporter.py KoboReader.sqlite --format text

$ # change export directory
$ python3 kobo-annotations-exporter.py KoboReader.sqlite --directory export_directory

$ # print help
$ python3 kobo-annotations-exporter.py --help

Contributions

  • This project is currently under development, feel free to report bugs or propose suggestions : any help is welcome !
  • I assume that the database structure is the same for all Kobo devices. Maybe it is not true, but I can't check. If your device is different from mine (Kobo Libra H2O), feel free to send me your KoboReader.sqlite. I would adapt my code if needed.

kobo-annotations-exporter's People

Contributors

tomglvng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

canyugs

kobo-annotations-exporter's Issues

Encoding error when ecport as text

When :
python kobo-annotations-exporter.py KoboReader.sqlite --text
I got thefollowing error
UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' in position 343: character maps to <undefined>

Improve ORDER BY

For the moment, the "ORDER BY" of annotations is naive : an annotation of the chapter 1 made after the chapter 2 will appear later...

How canI order annotation in the natural order ?

Handle export format in another way

The following code


        if self.export_format == 'word':
            WordExporter.export(annotations, self.export_directory)
        elif self.export_format == 'text':
            TextExporter.export(annotations, self.export_directory)
        else:
            ConsoleExporter.export(annotations)

is not ok. Need to refactor it !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.