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 10-16-2019, 02:55 PM   #1306
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
Seems like all is quiet on the western front. The go/no-go deadline on this release is about 33 hours from now; anybody got any showstoppers?
Rev. Bob is offline   Reply With Quote
Old 10-16-2019, 04:15 PM   #1307
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Not me - and if I find any after release, I can revert to the transient version I'm using today, or the one I was using before that

BR
BetterRed is offline   Reply With Quote
Advert
Old 10-17-2019, 08:29 AM   #1308
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
Okay, here's RC2, a little early. Changes from RC1:
- Incorporated an option which had fallen through the cracks, to move metadata jackets to the end of the book rather than keeping them at the beginning.
- Adjusted the pagemap removal function so that it is possible to remove all pagemaps or only the ones that come from Google Play.
- Updated the help file and clarified that pagemaps (proprietary from Adobe) are not the same as pagelists (part of the EPUB standard). Removing pagemaps does not affect pagelists.

To be clear, both pagemap removal options will nuke GP maps. It's just that one only nukes those. (I'll admit it: This mod's for me, because I like real maps but hate GP's fake ones.)

This shouldn't need much (more) testing; I ran it on a selection of GP ebooks, as well as some where I'd modified the GP pagemaps to flunk the recognition tests. The only real new-to-me feature is the jacket location thing, which looks really simple in the code - so anyone who wants to check that, feel free.

EDIT: Removed to fix XPGT bug. New RC2 is here.

Last edited by issybird; 10-17-2019 at 06:23 PM. Reason: Restore post.
Rev. Bob is offline   Reply With Quote
Old 10-17-2019, 08:55 AM   #1309
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: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I found a bug in RC1 and it still exists in RC2. I have an ePub that has a page-template.xpgt file and the links. The links are not being removed.

Attached is a scrambled copy of the ePub and a screen grab of my Modify ePub settings.
Attached Thumbnails
Click image for larger version

Name:	Modify ePub.jpg
Views:	119
Size:	99.8 KB
ID:	174292  
Attached Files
File Type: epub Horrorstor - Grady Hendrix_scrambled.epub (3.24 MB, 179 views)
JSWolf is offline   Reply With Quote
Old 10-17-2019, 11:24 AM   #1310
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 found a bug in RC1 and it still exists in RC2. I have an ePub that has a page-template.xpgt file and the links. The links are not being removed.

Attached is a scrambled copy of the ePub and a screen grab of my Modify ePub settings.
Have you tried it with JUST the no-XPGT option checked?
Rev. Bob is offline   Reply With Quote
Advert
Old 10-17-2019, 11:55 AM   #1311
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,428
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Rev. Bob View Post
Have you tried it with JUST the no-XPGT option checked?
I tried with only the Remove Adobe .xpgt files and links option checked and the links were still there.

Code:
<head>
    <title>Scrambled</title>
    <link href="../Styles/Hend_9781594747274_epub_css_r1.css" rel="stylesheet" type="text/css"/>
    <link href="page-template.xpgt" rel="xpgt" type="application/vnd.adobe-page-template+xml"/>
    <meta content="urn:uuid:76e82555-1f69-4cd0-9d48-4afaa16b6579" name="Adept.expected.resource"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  </head>
DNSB is offline   Reply With Quote
Old 10-17-2019, 12:29 PM   #1312
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
Okay, I see the problem: the links are improperly, or at least weirdly, formatted. The rel="xpgt" section is supposed to be rel="stylesheet" - at least, that's what Modify is expecting.

(Side note: Not a new bug. Old code.)

Luckily, despite not knowing XPath, this isn't too hard to fix. One line tweaked in modify.py (to detect "stylesheet" or "xpgt"), and a line added to the changelog.

EDIT: This is now the official version 1.4.0, and should be identical to the attachment on the first post.
Attached Files
File Type: zip Modify ePub (1.4.0).zip (75.5 KB, 117 views)

Last edited by Rev. Bob; 10-18-2019 at 11:53 AM.
Rev. Bob is offline   Reply With Quote
Old 10-17-2019, 02:07 PM   #1313
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Rev. Bob View Post
Okay, I see the problem: the links are improperly, or at least weirdly, formatted. The rel="xpgt" section is supposed to be rel="stylesheet" - at least, that's what Modify is expecting.

(Side note: Not a new bug. Old code.)

Luckily, despite not knowing XPath, this isn't too hard to fix. One line tweaked in modify.py (to detect "stylesheet" or "xpgt"), and a line added to the changelog.
This last one searches for the Adobe, then complains about a missing EPUB when there is only a KEPUB (AZW3 ->KEPUB) present.
Have no idea how long this behavior existed
theducks is online now   Reply With Quote
Old 10-17-2019, 03:45 PM   #1314
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: 73,983
Karma: 128903378
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
Okay, I see the problem: the links are improperly, or at least weirdly, formatted. The rel="xpgt" section is supposed to be rel="stylesheet" - at least, that's what Modify is expecting.

(Side note: Not a new bug. Old code.)

Luckily, despite not knowing XPath, this isn't too hard to fix. One line tweaked in modify.py (to detect "stylesheet" or "xpgt"), and a line added to the changelog.
Would it not also be good to search for href="page-template.xpgt" as well? That has to be there for no matter what else is there.
JSWolf is offline   Reply With Quote
Old 10-17-2019, 05:21 PM   #1315
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Rev. Bob View Post
- Incorporated an option which had fallen through the cracks, to move metadata jackets to the end of the book rather than keeping them at the beginning.
Thanks, didn't know there was a crack into which it could fall - works fine, one thing less I have to do in Sigil

Any chance of getting a nuke dc:description option so I can dodge calibre's insistence on spell checking it.

This is what I "f****d" up

BR

Last edited by BetterRed; 10-17-2019 at 07:23 PM.
BetterRed is offline   Reply With Quote
Old 10-17-2019, 06:42 PM   #1316
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
Would it not also be good to search for href="page-template.xpgt" as well? That has to be there for no matter what else is there.
Short answer: No.
Long answer: Nnnnnnooooooooooooo.

Seriously, though: That routine works in basically two stages. First, it looks for LINK elements which have an HREF attribute and have a REL attribute which matches “stylesheet” or (now) “xpgt.” Once it builds that list, it then goes through and deletes all of those where the HREF attribute ends with “.xpgt.”

Therefore, the second test is already catching every possible *.xpgt filename. No good purpose is served by restricting it to “page-template.xpgt” instead or adding an additional check for that one filename in that stage. The problem, such as it was, existed with the first test, where “xpgt” was not an expected value and (I strongly suspect) is not a “legal” value, but clearly was used in at least one case.

As for foregoing the first test… really awful idea. I’ll grant that I cannot immediately think of a circumstance where an XPGT file can be linked to without being used as a template, but that’s the kind of approach that can go really wrong very fast.

Last edited by Rev. Bob; 10-17-2019 at 06:46 PM.
Rev. Bob is offline   Reply With Quote
Old 10-17-2019, 07:54 PM   #1317
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: 73,983
Karma: 128903378
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
Short answer: No.
Long answer: Nnnnnnooooooooooooo.

Seriously, though: That routine works in basically two stages. First, it looks for LINK elements which have an HREF attribute and have a REL attribute which matches “stylesheet” or (now) “xpgt.” Once it builds that list, it then goes through and deletes all of those where the HREF attribute ends with “.xpgt.”

Therefore, the second test is already catching every possible *.xpgt filename. No good purpose is served by restricting it to “page-template.xpgt” instead or adding an additional check for that one filename in that stage. The problem, such as it was, existed with the first test, where “xpgt” was not an expected value and (I strongly suspect) is not a “legal” value, but clearly was used in at least one case.

As for foregoing the first test… really awful idea. I’ll grant that I cannot immediately think of a circumstance where an XPGT file can be linked to without being used as a template, but that’s the kind of approach that can go really wrong very fast.
The good thing is that the use of page-template.xpgt has dropped significantly. When Modify ePub was created, this horrible file was used a lot more. The eBook with this file was created sometime in 2014. And page-template is not used in any software other then RMSDK (ADE) and from what I saw, it may have only been used for margins which was a very stupid thing to do because margins should be set in CSS.
JSWolf is offline   Reply With Quote
Old 10-17-2019, 08:35 PM   #1318
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 BetterRed View Post
Thanks, didn't know there was a crack into which it could fall - works fine, one thing less I have to do in Sigil
It’s called “I misplaced my notes and discovered them while prowling the archives.”

Quote:
Originally Posted by BetterRed
Any chance of getting a nuke dc:description option so I can dodge calibre's insistence on spell checking it.
Not in this version, at least. Plus, that’s really easy to blank through the standard calibre library interface, just by deleting it on the metadata screen.
Rev. Bob is offline   Reply With Quote
Old 10-17-2019, 09:01 PM   #1319
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Rev. Bob View Post
Not in this version, at least. Plus, that’s really easy to blank through the standard calibre library interface, just by deleting it on the metadata screen.
I don't want it to delete the Comments from the library metadata database, only from within the epub. No worries, I do it today with the Sigil metadata editor tool - for me at least the OPF is 'too precious' to edit by hand.

BR

Last edited by BetterRed; 10-17-2019 at 09:04 PM.
BetterRed is offline   Reply With Quote
Old 10-17-2019, 11:00 PM   #1320
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,428
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Interesting. When I tried to run ModifyEpub RC2 on an ebook converted from pdf to epub, it pretty much froze calibre for >20 minutes before I end tasked calibre (last half of the 3rd period, overtime and shootout). Tried moving the epub to another library and still froze. Polish worked without issue. Scrambled the book and will attach to this message. Anyone else care to test and let me know if they see any issues with ModifyEpub?
Attached Files
File Type: epub The Flat Broke Cookbook - Daisy Luther_scrambled.epub (163.6 KB, 104 views)
DNSB 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 06:08 AM.


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