A package to extract highlights from kobo books
Reason this release was yanked:
Wrong versioning
Project description
Description
With this script you can get the highlights from Kobo reader using the sqlite file. The reason I made it is because when you export the highlights, a basic information as the page where are located is not exported. Oh, thanks, Kobo, for this useless option. When I highlight something usually I want to reference in other place, so maybe I need to search in the original content to expand the context.
Basic Usage
To run the basic usage, you just need to clone this repo and follow the next steps:
- Export the
KoboReader.sqlite
file from your Kobo and place it in the root path where this code has been downloaded. - Run
pip install .
orpip install --upgrade .
- Run
python app.py
All the highlights will be extracted and saved in an .md file with the name of the book, into a highlights
folder, and with the follow structure:
# Title
## Chapter 1
Lorem Ipsum
Progress: Position progress on chapter
Date: date when the highlight was highlighted
---
Lorem Ipsum2
Progress: Position progress on chapter
Date: date when the highlight was highlighted
## Chapter B
Lorem Ipsum
Note: A note
Progress: Position progress on chapter
Date: date when the highlight was highlighted
...
Advanced usage
This script accepts some parameters to use in a more advanced usage:
--db-file
: if your .sqlite file has another name, you can specify it with this param--template
: if you want to use another template, you can pass it using this param. Please, use the template at the end as example to know what variables you can use.--highlights-path
: if you want to put the exported highlights in another place, you can specify it with this param.
Basic template
# {{ book_data['book_title'] }}
{% for chapter in book_data['chapters'] %}
## {{ chapter['chapter_title'] }}
{% for highlight in chapter['highlights'] %}
> {{ highlight['highlight'].strip() }}
{% if highlight['note'] is not none and highlight['note'] != "" %}
Note: {{ highlight['note'] }}
{% endif %}
Progress: {{ highlight['chapter_progress'] }} %
Date: {{ highlight['date'] }}
---
{% endfor %}
{% endfor %}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kobo_highlights_extractor-0.0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c106fcf1eb5aa6efc6ee956dcb0aab433d6aae0ef7bcdbd0c8bce58bfd6944 |
|
MD5 | 14d77e8e8990eba3ae085a3d730ccfe4 |
|
BLAKE2b-256 | 42b68f4040c6c1e19530846580473d88445048728a5efa7793a08a43b3c3382f |
Hashes for kobo_highlights_extractor-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0626e2832293e179c230e2db9f7c8569a665269be020d98385dcd3c9be50345a |
|
MD5 | 59b5c9a49d79cfabc31d87ef3a4b1e47 |
|
BLAKE2b-256 | 5aa952df2cd90f2424e7b102444be83e1644cd31e79e4c7284461ff087b1758f |