degiz / kobo2calibre Goto Github PK
View Code? Open in Web Editor NEWEmbed highlights from Kobo device in Calibre book
License: MIT License
Embed highlights from Kobo device in Calibre book
License: MIT License
I have a Kobo Libra 2 with software 4.35. The format it stores for highlight CFI strings seems to be different from what kobo2calibre expects. I am seeing values like this: index_split_000.html#point(/1/4/896/23:202)
and the split
calls in parse_kobo_highlights
are not yielding the expected results.
The EPUB file is not from kobo.com, but was uploaded from calibre. But I created the highlight on the Libra 2 itself.
Related to #2 , it could be useful to add the possibility of exporting a single specific book. This would be helpful when, for example, Calibre is not the only way one adds books to Kobo: in this case, Kobo and Calibre libraries will not be the same.
Getting the following error message when trying to run the code:
Traceback (most recent call last):
File "/Users/panomitrius/kobo2calibre/parse_kobo_highlights.py", line 7, in <module>
import calibre
File "/Users/panomitrius/kobo2calibre/calibre.py", line 6, in <module>
import bs4
ModuleNotFoundError: No module named 'bs4'
I have installed bs4 by running python3 -m pip install beautifulsoup4
without any error messages. Running python3 -m pip show beautifulsoup4
returns:
Name: beautifulsoup4
Version: 4.11.1
Summary: Screen-scraping library
Home-page: https://www.crummy.com/software/BeautifulSoup/bs4/
Author: Leonard Richardson
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python3.10/site-packages
Requires: soupsieve
Required-by:
I've installed the calibre plugin, but it does not import highlights.
Steps:
Result:
A pop is shown saying "Inserted 0 highlights into calibre"
I've tried this with various books.
I am using a Kobo Libra 2, a MacBook and calibre 6.10.
Running the code with the following line poetry run python parse_kobo_highlights.py "/Volumes/KOBOeReader" "$HOME/Documents/Calibre Library"
gives the following error message:
Traceback (most recent call last):
File "/Users/panomitrius/kobo2calibre/parse_kobo_highlights.py", line 87, in <module>
main(args)
File "/Users/panomitrius/kobo2calibre/parse_kobo_highlights.py", line 35, in main
likely_book_id, likely_book_path = db.get_likely_book_path_from_calibre(
File "/Users/panomitrius/kobo2calibre/db.py", line 43, in get_likely_book_path_from_calibre
book_path = cur.execute(f"SELECT path FROM books WHERE id = {book_id}").fetchone()[
sqlite3.OperationalError: no such column: None
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.