Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 06-10-2014, 08:25 PM   #691
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
Dirty little bug...

Let's see if this two-line fix does the trick. It looks like it works on this end, but I want outside verification...
That's done it. Thank you very much!
JSWolf is offline   Reply With Quote
Old 06-10-2014, 08:31 PM   #692
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
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:
Originally Posted by JSWolf View Post
That's done it. Thank you very much!
I can only count it as a half-victory; I was hoping to get it to remove empty CLASS attributes (class="") from navPoint nodes as well. Unfortunately, it seems that I do not know enough Python - or enough about this environment - to be able to make that happen. The code looked good to me, but it didn't do anything, so I just completely backed it out.

At any rate - with that bugfix added, I'm ready to lock my changes down and hand the plugin over to the original author for sanctification.

EDIT: Have PM'd kiwidude with the lockdown message. Thanks to everyone who's helped in the development, and as far as I'm concerned, he's once again the Sole Keeper Of The Code. (Unless, y'know, he has questions for me or something.)

Last edited by Rev. Bob; 06-10-2014 at 08:50 PM.
Rev. Bob is offline   Reply With Quote
Advert
Old 06-10-2014, 08:49 PM   #693
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
I can only count it as a half-victory; I was hoping to get it to remove empty CLASS attributes (class="") from navPoint nodes as well. Unfortunately, it seems that I do not know enough Python - or enough about this environment - to be able to make that happen. The code looked good to me, but it didn't do anything, so I just completely backed it out.

At any rate - with that bugfix added, I'm ready to lock my changes down and hand the plugin over to the original author for sanctification.
I think you've done very well. I don't see why this won't be approved.
JSWolf is offline   Reply With Quote
Old 06-10-2014, 08:52 PM   #694
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
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:
Originally Posted by JSWolf View Post
I think you've done very well. I don't see why this won't be approved.
I try never to make assumptions about approval when messing with another man's code. I know how territorial I can get on web pages, so I try to respect that when I'm on the other end.
Rev. Bob is offline   Reply With Quote
Old 06-11-2014, 02:19 AM   #695
lordsilent
Enthusiast
lordsilent began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Jan 2009
Device: PRS-700
Hey guys, thanks for the work on this plugin but I have a slight problem.

I am attempting to remove kobo drm from a file that i recently bought from their store however I think the script is hiccuping on the fact the book is in Japanese. Can anyone help me with this?

Thanks

Quote:
Modify ePubs
Logfile for book ID 99 (コップクラフト1 DRAGNET MIRAGE RELOADED / 賀東招二)
99
Modifying: C:\Users\Silent\AppData\Local\Temp\calibre_ekd93w\ 3bu62o_modify_epub\99.epub
C:\Program Files\Calibre2\pylib.zip\dateutil\parser.py:336: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
Parsing xml file: OEBPS/content.opf
Stripping Kobo remnants
Removed kobo.js file: OEBPS/Text/js/kobo.js
Removed rights.xml file: rights.xml
Removed Kobo HEAD elements from: OEBPS/toc.xhtml
calibre_plugins.modify_epub.modify:639: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
calibre_plugins.modify_epub.modify:643: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
calibre_plugins.modify_epub.modify:645: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
calibre_plugins.modify_epub.modify:641: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
コップクラフト1 DRAGNET MIRAGE RELOADED - ERROR: Traceback (most recent call last):
File "calibre_plugins.modify_epub.modify", line 79, in process_book
File "calibre_plugins.modify_epub.modify", line 179, in _process_book
File "calibre_plugins.modify_epub.modify", line 679, in _strip_kobo
File "calibre_plugins.modify_epub.modify", line 674, in strip_kobo_for_page
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd0 in position 1: invalid continuation byte

ePub not changed after 0.52 seconds
lordsilent is offline   Reply With Quote
Advert
Old 06-11-2014, 02:40 AM   #696
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
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:
Originally Posted by lordsilent View Post
Hey guys, thanks for the work on this plugin but I have a slight problem.
I'd just locked it, but let's see what I can do:

Quote:
Originally Posted by lordsilent
I am attempting to remove kobo drm from a file that i recently bought from their store however I think the script is hiccuping on the fact the book is in Japanese. Can anyone help me with this?
That's a definite problem, and one I'm glad to have a good test case for. I don't claim to be a Python expert in any way, but the error message plus Google have shown me a promising avenue of attack. I'll get on the case tomorrow; if I'm right about the fix, it should be a basic edit to a few lines...basically, using a resource that I was unaware was available in the language, namely the "convert this to Unicode to compare" feature.
Rev. Bob is offline   Reply With Quote
Old 06-11-2014, 02:48 AM   #697
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by lordsilent View Post
I am attempting to remove kobo drm from a file ... Can anyone help me with this?
No one here at Mobileread can help you with DRM removal it is against forum rules. Good luck with the rest of your issue.
DoctorOhh is offline   Reply With Quote
Old 06-11-2014, 03:27 AM   #698
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
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:
Originally Posted by DoctorOhh View Post
No one here at Mobileread can help you with DRM removal it is against forum rules. Good luck with the rest of your issue.
There's a terminology issue here. If he's using the plugin I'm talking about, the DRM is already gone. The plugin just removes the extra code bloat left behind by the removed DRM.

Thus, we're not discussing DRM removal, but post-removal cleanup...which should be fine, right?

ETA: Although, if he's trying to use the plugin on a still-DRMed file, that would probably explain several things - but I've seen the error before and just needed a reminder to track it down, so even then he's helping me fix cleanup rather than removal. I don't have anything to do with removal, nor does this plugin.

Last edited by Rev. Bob; 06-11-2014 at 03:30 AM.
Rev. Bob is offline   Reply With Quote
Old 06-11-2014, 03:33 AM   #699
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Rev. Bob View Post
Thus, we're not discussing DRM removal, but post-removal cleanup...which should be fine, right?
Absolutely fine. I was just clarifying things in ref to drm.

Quote:
Originally Posted by Rev. Bob View Post
ETA: Although, if he's trying to use the plugin on a still-DRMed file, that would probably explain several things - but I've seen the error before and just needed a reminder to track it down, so even then he's helping me fix cleanup rather than removal.
Good Luck with helping smooth out this issue.

Quote:
Originally Posted by Rev. Bob View Post
I don't have anything to do with removal, nor does this plugin.
This I know.
DoctorOhh is offline   Reply With Quote
Old 06-11-2014, 06:49 PM   #700
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
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:
Originally Posted by lordsilent View Post
I think the script is hiccuping on the fact the book is in Japanese. Can anyone help me with this?
See if this update does the trick. If it does, we should be in great shape.

The changes here affect both new routines, explicitly making the string comparisons in Unicode mode. At least, that's the theory.

ETA: The code seems to work okay on my end, but I don't have a proper test subject to make sure the Unicode comparison is working as intended. Silent, or anyone else with a suitable test book, please give me some feedback on this...
Attached Files
File Type: zip Modify ePub - stripspans and stripkobo.zip (124.3 KB, 299 views)

Last edited by Rev. Bob; 06-12-2014 at 04:16 PM. Reason: Need feedback!
Rev. Bob is offline   Reply With Quote
Old 06-19-2014, 06:34 PM   #701
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
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:
Originally Posted by Rev. Bob View Post
ETA: The code seems to work okay on my end, but I don't have a proper test subject to make sure the Unicode comparison is working as intended. Silent, or anyone else with a suitable test book, please give me some feedback on this...
It seems I spoke too soon. My older code works fine most of the time, but when I try to make it Unicode-friendly...something's not right, and I don't know how to fix it.

Do we have a Python 2.7 Unicode guru in the house? The latest attempt is attached.
Attached Files
File Type: zip Modify ePub - stripspans and stripkobo.zip (124.4 KB, 313 views)
Rev. Bob is offline   Reply With Quote
Old 07-09-2014, 08:24 AM   #702
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
When is the current version going to be converted so we have Modify ePub for when Calibre 2.0 comes out?
JSWolf is offline   Reply With Quote
Old 07-09-2014, 01:43 PM   #703
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
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
It's in the works...
Rev. Bob is offline   Reply With Quote
Old 07-09-2014, 05:28 PM   #704
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
It's in the works...
Thank you much!
JSWolf is offline   Reply With Quote
Old 07-10-2014, 09:31 AM   #705
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
FYI, I am not kiwidude and this isn't my plugin. But I'm trying to help out by porting some of the plugins I use regularly while kiwidude is busy.

Attached is a test version that should work for both the existing 1.X calibre and the upcoming 2.X version calibre. 2.x will use PyQt5 which requires changes to virtually all plugins.

This version needs to be tested with the existing calibre.

Brave souls to test with with the beta 2.X version would also be appreciated. Links to the 2.X beta and discussion of the transition (for plugins) can be see at: Attn plugin developers: calibre moving to Qt 5.

Note: This version is based on the released version of the plugin, not the modified version recently posted in the thread.
Attached Files
File Type: zip Modify ePub-qt5.zip (64.0 KB, 332 views)
davidfor is offline   Reply With Quote
Reply

Tags
modify epub


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1184 04-17-2024 06:17 PM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[GUI Plugin] Manage Series kiwidude Plugins 166 02-13-2024 11:31 AM
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


All times are GMT -4. The time now is 11:55 AM.


MobileRead.com is a privately owned, operated and funded community.