05-23-2012, 04:00 PM | #136 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
|
|
05-23-2012, 06:35 PM | #137 |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
So long as the text has been converted to smart quotes first, it's not a problem, but yeah, it means I can't do it the easy way and flip them before using smart quotes.
|
Advert | |
|
05-23-2012, 06:37 PM | #138 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
From what I see, the code for converting to smart quotes sees >" in the middle or a line and thinks it's at the beginning of a line.
Should be easy enough to search for after the smart quote conversion is done. |
05-24-2012, 07:49 AM | #139 | |
Addict
Posts: 304
Karma: 2454436
Join Date: Sep 2008
Device: PRS-505, PRS-650, iPad, Samsung Galaxy SII (JB), Google Nexus 7 (2013)
|
Quote:
Something like: X said "First thing "Second thing "Last thing" Don't quote me on that though |
|
05-24-2012, 08:06 AM | #140 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@Kirtai - yes, you are quite correct, I've seen that too. And you only have to look at all the issues that the smarten punctuation logic has been tweaked and now reverted on to see that it is just too "dangerous" to expect an automated regex to not create a bigger mess than you started with in a number of cases.
I still stand by my original comment in that it isn't something I am interested in adding to this plugin. I only want features that are no-brainers to choose to run without further editing by the user required. I think this sort of requirement is something that would be better located within Sigil one day. |
Advert | |
|
05-24-2012, 08:16 AM | #141 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
I've seen a number of issues caused by javascript. Earlier versions of Sigil used to choke on it completely, stopping rendering of the page thereby corrupting your book. And with the new regex engine in Sigil 0.5.3 and all its awful bugs it seems I can't even remove the script blocks... my regexes just result in yet more blank lines being added to the header... sigh...
It's something I will consider at some point - of course it needs a QC to find books with such script blocks (both inline and external files) and then something to remove it all. Perhaps as part of ePub3 or whatever there are some intended usages for javascript, there is no place in my books for sure and most are just remnants of the original text being an interactive web page at some point before conversion to ePub. |
05-24-2012, 08:18 AM | #142 |
Addict
Posts: 304
Karma: 2454436
Join Date: Sep 2008
Device: PRS-505, PRS-650, iPad, Samsung Galaxy SII (JB), Google Nexus 7 (2013)
|
Oh, I wasn't suggesting you add it. Quite the opposite, I was giving an example of why you shouldn't
|
05-24-2012, 08:21 AM | #143 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@Kirtai - I didn't think otherwise, I just didn't want the discussion to continue on in this thread about it in case others got the idea it was being considered...
|
05-24-2012, 11:32 AM | #144 |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
Fair enough; it would be better suited to a Sigil plugin, so I'll just have to hope that Sigil plugins one day become A Thing.
|
05-28-2012, 02:36 PM | #145 |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
For another feature request, would it be possible for this plugin to remove styles that are unused in the EPUB from the stylesheet?
|
05-28-2012, 04:07 PM | #146 | |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
If your epub has a bunch of unused styles, then it is probably unlikely to be a retail one, in which case why not just do a calibre conversion on it? As calibre automatically removes unused styles as part of its css flattening. |
|
06-01-2012, 02:32 PM | #147 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
v1.2.0 Released
Changes in this release:
All of the discussions related to the beta versions of this release have been moved into the Modify ePub development forum thread. This is a pretty massive release in terms of effort - I don't want to even think about how many hours went into it! You wouldn't think that making sure an ePub has a cover with all the correct references to it was so difficult. However at long last it is possible to cleanly insert/replace/remove covers for ePubs without risking the side effects of a conversion, which is pretty darn cool if I say so myself. My huge thanks to all the testers for their invaluable feedback and patience through the many iterations to get to this point... enjoy. |
06-01-2012, 04:48 PM | #148 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I hate to be the bearer of bad news, but I just found a bug in the new release. The links to the page-template file are not being removed. I'm using the almost the same options as the screen sent you before except the cover options are not selected.
Code:
Modify ePubs Logfile for book ID 152 (Star Trek: Typhon Pact: Plagues of Night / David R. George III) 152 Modifying: C:\Users\Jon\AppData\Local\Temp\calibre_0.8.54_tmp_pxljof\thvdmq_modify_epub\152.epub Looking for files to remove: [u'iTunesMetadata.plist', u'iTunesArtwork'] Looking for files to remove: [u'META-INF/calibre_bookmarks.txt'] Looking for files to remove: [u'.DS_Store', u'thumbs.db'] Looking for unused images Removing unused image: ops/images/9781451649574.jpg Manifest item removed: images/9781451649574.jpg (my--cover--image) Looking for Adobe xpgt files to remove Found xpgt file to to remove: ops/styles/page-template.xpgt Manifest item removed: styles/page-template.xpgt (pt) Looking for Adobe xpgt xhtml links to remove Looking for Adobe DRM meta tags to remove ePub updated in 0.96 seconds |
06-01-2012, 05:09 PM | #149 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Since when... Like you couldn't have found this two hours ago... sigh...
Actually this is something that has been broken for a while, it isn't specific to this release (the only good news from my viewpoint - something I didn't break). It is a flaw in the regex I was using to identify the links, for some inanely stupid reason it was written with an ordering dependency in it. The QC plugin has the same flaw... Thanks for the PM with the link btw, makes my life instantly easier to figure it out. |
06-01-2012, 05:31 PM | #150 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
v1.2.1 Released
Changes in this release:
|
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 |