|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2025
Device: none
|
Seeking Guidance on Modularizing Calibre's Ebook Viewer and Organizing Source Code
I am currently working on a fork of Calibre and want to separate all code and files related solely to the ebook viewer into a dedicated directory. My goal is to make the viewer runnable as a standalone application by executing main.py from src/calibre/gui2/viewer.
If this separation is not feasible, I would like to know how I can write my own viewer that leverages Calibre’s ebook viewer features, such as read aloud, search, highlights, and bookmarks. Which classes or modules should I study so I can invoke these functionalities from my own code? Additionally, I have noticed that running python -m src.calibre.gui2.viewer.main results in errors like "polyglot module not found," and even after fixing that, other errors appear. However, running calibre-debug -c "from calibre.gui2.viewer.main import main; main()" works fine and launches the viewer. What does calibre-debug do in the backend to make this work, and how can I replicate this behavior in my own setup? Are there any tips or sources available for organizing the Calibre source code? Any guidance or insights would be helpful!!! |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,365
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Moderator Notice Please don't multi-post. Thread closed. Original post: https://www.mobileread.com/forums/sh...d.php?t=368417 |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Seeking Guidance on Modularizing Calibre's Ebook Viewer and Organizing Source Code | suprezg | Development | 4 | 06-02-2025 08:08 AM |
ebook-convert source code | faredoon | Development | 4 | 12-08-2017 08:15 PM |
[old-topic]ebook-viewer: Open source, crossplatform viewer for EPUB, LIT, MOBI, etc | kovidgoyal | Calibre | 68 | 05-30-2011 08:46 PM |
iLiad Is source code of iLiad image viewer available? | ericshliao | iRex Developer's Corner | 1 | 01-16-2008 02:24 AM |