![]() |
#1351 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
|
![]() |
![]() |
![]() |
#1352 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I missed the portable install. Running the calibre-debug executable in the portable install directory works. But, it doesn't use the portable's settings. It looks like it is using the configuration from my main install. But, setting the environment variable CALIBRE_CONFIG_DIRECTORY to the portable's settings directory fixes that.
|
![]() |
![]() |
Advert | |
|
![]() |
#1353 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80
Karma: 2112464
Join Date: May 2019
Device: Kobo Aura One LE
|
David, thank you. Setting the environment variable did it indeed.
|
![]() |
![]() |
![]() |
#1354 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3
Karma: 5176
Join Date: Jan 2020
Device: kobo
|
Hi
I was an happy user of modify epub, but Linux distributions are switching to python3 calibre. And the plugin does not works on python3. I know precompiled version of calibre is python2 but linux distributions make their own packages (and python2 is unsupported). I have tried to modify the plugin, to works on python3 but I am not sure it is the best way. http://dl.free.fr/bSU9v0Uaf Are you interested in converting your plugin to python3 ? (I think it would be possible to make a plugin compatible with python2.7 and 3) Thanks in advance |
![]() |
![]() |
![]() |
#1355 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
The long answer is that porting calibre to Python 3 is underway. And plugins are discussed here. The Python 3 version won't be released for a while, so plugins are being ported as the author/maintainer has time. Anyone who wants to help is welcome to. |
|
![]() |
![]() |
Advert | |
|
![]() |
#1356 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
And I, for one, am not fluent in Python 3. I can get by enough to make monkey-see, monkey-do tweaks and fixes, as I have in the past, but that kind of wholesale upgrade is beyond me.
|
![]() |
![]() |
![]() |
#1357 | |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3
Karma: 5176
Join Date: Jan 2020
Device: kobo
|
Quote:
_ Correcting mix between space and tabs in source code (should be done even for python 2.6) _ iteritems() -> items() _ iterkeys() -> keys() _ from urlparse import urldefrag, urlparse, urlunparse -> from urllib.parse import urldefrag, urlparse, urlunparse _ from urllib import unquote as urlunquote -> from urllib.parse import unquote as urlunquote _ unicode -> str (all strings are utf8 now) The only tricky part is bytes vs str (and file opened or not with b). Sometimes this is utf8 strings sometimes binary data. You just have to add a .decode("utf-8")/ .encode("utf-8") and open files with b option when you are reading/writing binary data. But you need to know what data is expected. |
|
![]() |
![]() |
![]() |
#1358 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
|
![]() |
![]() |
![]() |
#1359 | |
Not Quite Dead
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
|
Quote:
|
|
![]() |
![]() |
![]() |
#1360 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
@Rev. Bob would you have a problem is anyone else was to fix up Modify ePub to work with Python 3?
|
![]() |
![]() |
![]() |
#1361 | |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3
Karma: 5176
Join Date: Jan 2020
Device: kobo
|
Quote:
But the python part is easy https://portingguide.readthedocs.io/...t/strings.html |
|
![]() |
![]() |
![]() |
#1362 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
![]() |
![]() |
![]() |
#1363 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
Quote:
To the extent that my opinion matters, I prefer the latter. |
|
![]() |
![]() |
![]() |
#1364 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If I could do it, I would. But I can't as well. But given how popular this plugin is, I do think someone will eventually do it.
|
![]() |
![]() |
![]() |
Tags |
modify epub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Quality Check | kiwidude | Plugins | 1251 | 07-07-2025 09:13 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] Manage Series | kiwidude | Plugins | 167 | 07-28-2024 03:07 PM |
Modify ePub plugin dev thread | kiwidude | Development | 346 | 09-02-2013 05:14 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |