Name | kobo-highlights-extractor JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A package to extract highlights from kobo books |
upload_time | 2024-05-04 12:39:38 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | None |
keywords |
kobo
ereader
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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:
1. Export the `KoboReader.sqlite` file from your Kobo and place it in the root path where this code has been downloaded.
2. Run `pip install .` or `pip install --upgrade .`
3. 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
```md
# {{ 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 %}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "kobo-highlights-extractor",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "kobo, ereader",
"author": null,
"author_email": "Toni Miquel Llull <tonimiquel.llull@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/24/9e/5978a46b4149d3ae20157540163dfe99bd966a103f067c36d2e23b550978/kobo_highlights_extractor-0.1.0.tar.gz",
"platform": null,
"description": "# Description\n\nWith 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.\n\n## Basic Usage\n\nTo run the basic usage, you just need to clone this repo and follow the next steps:\n\n1. Export the `KoboReader.sqlite` file from your Kobo and place it in the root path where this code has been downloaded.\n2. Run `pip install .` or `pip install --upgrade .`\n3. Run `python app.py`\n\nAll 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:\n\n```\n# Title\n\n## Chapter 1\n\nLorem Ipsum\n\nProgress: Position progress on chapter\nDate: date when the highlight was highlighted\n\n---\n\nLorem Ipsum2\n\nProgress: Position progress on chapter\nDate: date when the highlight was highlighted\n\n## Chapter B\n\nLorem Ipsum\n\nNote: A note \n\nProgress: Position progress on chapter\nDate: date when the highlight was highlighted\n\n...\n```\n## Advanced usage\nThis script accepts some parameters to use in a more advanced usage:\n\n- `--db-file`: if your .sqlite file has another name, you can specify it with this param\n- `--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.\n- `--highlights-path`: if you want to put the exported highlights in another place, you can specify it with this param.\n\n### Basic template\n```md\n# {{ book_data['book_title'] }}\n\n{% for chapter in book_data['chapters'] %}\n\n## {{ chapter['chapter_title'] }}\n\n{% for highlight in chapter['highlights'] %}\n\n> {{ highlight['highlight'].strip() }}\n\n{% if highlight['note'] is not none and highlight['note'] != \"\" %}\nNote: {{ highlight['note'] }}\n{% endif %}\n\nProgress: {{ highlight['chapter_progress'] }} %\nDate: {{ highlight['date'] }}\n\n---\n\n{% endfor %}\n{% endfor %}\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A package to extract highlights from kobo books",
"version": "0.1.0",
"project_urls": {
"Bug Tracker": "https://gitlab.com/tmllull/kobo-highlights-extractor/issues",
"Documentation": "https://kobo-highlights-extractor.readthedocs.io",
"Homepage": "https://gitlab.com/tmllull/kobo-highlights-extractor"
},
"split_keywords": [
"kobo",
" ereader"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "814abffda329c4a1c700e87bb23778183cce9180dd357bb04685b886ca37eddf",
"md5": "e97959c30d156fe73f81388ebbcae3ec",
"sha256": "d7ade53b5174342eb9c70201dfd5228bebcdc69691b0583f4677cb8c28efdf66"
},
"downloads": -1,
"filename": "kobo_highlights_extractor-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e97959c30d156fe73f81388ebbcae3ec",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 16639,
"upload_time": "2024-05-04T12:39:36",
"upload_time_iso_8601": "2024-05-04T12:39:36.744303Z",
"url": "https://files.pythonhosted.org/packages/81/4a/bffda329c4a1c700e87bb23778183cce9180dd357bb04685b886ca37eddf/kobo_highlights_extractor-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "249e5978a46b4149d3ae20157540163dfe99bd966a103f067c36d2e23b550978",
"md5": "4c94fabb778d3621b492f2f1b0506ef4",
"sha256": "c878c479b5112b96d353c908928bb44eaca93deb1426776321ceaed6189368fa"
},
"downloads": -1,
"filename": "kobo_highlights_extractor-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "4c94fabb778d3621b492f2f1b0506ef4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 16248,
"upload_time": "2024-05-04T12:39:38",
"upload_time_iso_8601": "2024-05-04T12:39:38.341814Z",
"url": "https://files.pythonhosted.org/packages/24/9e/5978a46b4149d3ae20157540163dfe99bd966a103f067c36d2e23b550978/kobo_highlights_extractor-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-04 12:39:38",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "tmllull",
"gitlab_project": "kobo-highlights-extractor",
"lcname": "kobo-highlights-extractor"
}