03-08-2017, 07:23 PM | #1081 | |
Enthusiast
Posts: 43
Karma: 70238
Join Date: Jun 2014
Device: none
|
Quote:
Besides, I think there a a lot of users who do download web pages (that potentially have images encoded this way) and make them into ebooks (fanficfare, news recipes, read-it-later type websites, etc.). I am one of them. Last edited by botmtl; 03-08-2017 at 07:28 PM. |
|
03-09-2017, 01:29 AM | #1082 | ||
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:
Is the book in question self-published or traditionally published? Quote:
|
||
Advert | |
|
03-09-2017, 01:51 AM | #1083 | ||
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Quote:
|
||
03-09-2017, 11:39 AM | #1084 | |
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:
I mean, after I got the EPUB to the point where it would validate, I ran my standard cleanup pass on the file and got no errors. That means that either the validation fixes resolved the issue (in which case, not a bug) or you're doing something I normally don't. This doesn't mean I'll make the change you're after - only that if I elected to investigate, I'd need more information than you've provided. In addition, that also means the behavior's in code I had nothing to do with, which would make changes more problematic. |
|
03-09-2017, 12:22 PM | #1085 | |
Resident Curmudgeon
Posts: 73,976
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
https://css-tricks.com/data-uris/ That link will tell you about data URIs. Data URIs do work with ADE and Calibre. |
|
Advert | |
|
03-09-2017, 01:13 PM | #1086 | |
Enthusiast
Posts: 43
Karma: 70238
Join Date: Jun 2014
Device: none
|
Quote:
This is what I get when I run modify-epub with that switch on: Looking for html pages containing only broken image links - Broken image link: "data:image/png;base64,iVBORw0KGg[...] in: ModifyEpubBug2.html - Broken image link: "data:image/png;base64,iVBORw0KGgoAA in: ModifyEpubBug.html |
|
03-09-2017, 03:17 PM | #1087 | |
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:
I already KNEW that part; I remember base64 encoding from back when it supplanted UUEncoding on Usenet. Doesn't help one bit in diagnosing the plugin problem reported, though. botmtl - I suspect from your description that "data:" isn't getting recognized as a protocol and is instead being treated as a filename... which, of course, doesn't exist and thus gets flagged as broken. It seems the official EPUB validation software has had some issues with that, in the context of pages saved in subdirectories. Anyway, if that's the case, this may be a fairly simple fix - just treat a string beginning with those five characters as automagically okay. (True, that won't catch malformed/corrupted data streams, but I think that's an acceptable risk.) I'm not at the computer right now, though, so it'll have to wait. I'll also have to watch out for that subfolder issue, but it really depends on the guts of the image link validation routine and where the path gets added to the specified "filename." |
|
03-09-2017, 08:03 PM | #1088 |
Enthusiast
Posts: 43
Karma: 70238
Join Date: Jun 2014
Device: none
|
I have a suggestion for a fix if you like it. In container.py (get_page_image_names), line 784, instead of
Code:
images = XPath('//h:img[@src]')(data) Code:
images = XPath('//h:img[not(starts-with(@src,"data:"))]')(data) **disclaimer: I'm about as good with python as I am programming LISP or assembly. **disclaimer: I haven't actually tried it in the plugin, but I known the XPath is valid at the very least. Last edited by botmtl; 03-09-2017 at 08:06 PM. |
04-11-2017, 03:09 AM | #1089 |
null operator (he/him)
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
If anyone is looking for the discussion on greyscale cover images, it's here Send/Save Cover in Greyscale
BR |
07-22-2017, 02:32 PM | #1090 |
Connoisseur
Posts: 80
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
|
|
07-22-2017, 03:10 PM | #1091 |
Resident Curmudgeon
Posts: 73,976
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
07-23-2017, 02:58 AM | #1092 | ||
Bibliophagist
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Last edited by DNSB; 09-07-2017 at 09:53 PM. |
||
09-07-2017, 10:33 AM | #1093 |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Presumably the same image? If so, could have put it in CSS and had it once in the CSS file. I just found a retail book that did that; I think it was the publisher's logo. I can see the logic in that if you're making a series of books. Just copy one single CSS file and the images it needs can't be misplaced (unless some plugin erases them).
|
09-07-2017, 09:57 PM | #1094 | |
Bibliophagist
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
09-28-2017, 03:35 PM | #1095 |
Tech appreciator
Posts: 23
Karma: 10
Join Date: Jul 2012
Device: Onyx Boox Kepler Pro (wow I love this reader!)
|
Forego backup option
Praise and gratitude for this fabulous tool.
It would be very nice to have an option to simply overwrite the existing epub file, rather than create a backup with the ".ORIGINAL_EPUB" extension. Since I'm running the routine immediately after importing the book to Calibre, I already have a backup in the original imported file. If the results should go disastrously wrong (though they never do), I can always re-import the original. Would save the extra step of having to delete the backup copies every single time. Even though I already made a $ contribution some time ago, I would seriously consider doing it again if my wish were granted. Thanks! |
Tags |
modify epub |
|
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 |