A package to extract highlights from kobo books
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
File details
Details for the file kobo_highlights_extractor-0.0.1.tar.gz
.
File metadata
- Download URL: kobo_highlights_extractor-0.0.1.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a088ffe07771247fd26bbdf58238299fc6275c08b1545c65158e8939f05e187d |
|
MD5 | c7b2d926eaeb7130e30583601d21b33d |
|
BLAKE2b-256 | 0d5f7bfe1652cf3d17c327e08aff814cea0d632c07f6959e2793d101f95c59dc |
Provenance
File details
Details for the file kobo_highlights_extractor-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: kobo_highlights_extractor-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 418124002581accc84c208faeea6b91ad229fe4f755b640c8dbf7b9aa1824f9c |
|
MD5 | 381810fe8cacc51054aaed9f04089dac |
|
BLAKE2b-256 | b6f868f3b3d9542187bcd4e21d438aa84c242bb5ef8b1e28967ab7c4b86f01e1 |