04-03-2014, 12:38 PM | #601 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Just looked at source of this PI and I think you could hi-jack the smarten-punctuation function, in modify.py - line 497 calls the smarten routine for each of the raw html files, so if you called a 'span-trim' function instead, that should manage it.
Edit: Backup your existing PI, and any testing epubs beforehand. Last edited by Perkin; 04-03-2014 at 12:43 PM. |
04-03-2014, 12:52 PM | #602 | |
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:
|
|
Advert | |
|
04-03-2014, 01:27 PM | #603 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Inside the 'modify epub.zip' - the actual plugin.
Unzip Edit/modify. re-zip. Test repeat |
04-03-2014, 01:49 PM | #604 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
@Rev. Bob
This is a modified 'modify epub' plugin that contains the changes. Please note that I haven't tested it as I haven't got a file that needs modifying. Backup your original 'modify epub.zip', then replace with this version. run the modify epub plugin on required file ONLY with 'smarten punctuation' option set, it will do the strip-spans instead. Check output. When needed, restore original plugin. N.B. THIS IS A MODIFIED VERSION OF THE PLUGIN, DO NOT USE UNLESS YOU HAVE READ THE THREAD AND SEEN WHAT THIS DOES. |
04-03-2014, 02:20 PM | #605 |
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
|
...which I can't bloody find.
Yes, I know there's a copy of the ZIP in the first post of this thread. I'm saying that I installed it through Calibre's interface, and I can't find where Calibre stashed it. Obviously it's installed, but for the life of me I can't see where it's installed. |
Advert | |
|
04-03-2014, 02:25 PM | #606 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Open calibre configuration directory. But I'd assume the copy at the beginning of this thread works just as well. |
|
04-03-2014, 02:33 PM | #607 | |
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:
And as for why I was hunting for the installed version - I'd kinda like to be able to strip spans and smarten punctuation at the same time, should a book need it, so I'd prefer to find a way to expand the feature set. Maybe I can, now that I know where everything is... |
|
04-03-2014, 02:53 PM | #608 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Also, if you load the (modified) plugin through preferences, it should overwrite/update the current copy. So you could d/l from this thread, update/modify, and reinstall. |
|
04-03-2014, 03:02 PM | #609 | |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Quote:
You would need to add another option to the options pane, and then duplicate the smarten option function code, rewriting to do the strip spans instead. Can you test to see if that stripping works? Then we'll see about adding the extra option and associated code. |
|
04-03-2014, 04:14 PM | #610 | |
null operator (he/him)
Posts: 20,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
If you want to put config data elsewhere then see CALIBRE_CONFIG_DIRECTORY at http://manual.calibre-ebook.com/cust...ment-variables BR Last edited by BetterRed; 04-03-2014 at 04:24 PM. |
|
04-03-2014, 04:35 PM | #611 | ||
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:
Quote:
- remove_drm_meta_tags now removes the trailing newline as well, so the Adobe line completely goes away instead of leaving a blank line. - "Smartify punctuation" routine restored. - New code renamed "strip_spans" and available through the --strip_spans command line option. - strip_spans expanded to remove "rights.xml" and "kobo.js" - both remnants of the Kobo DRM scheme - from the book and manifest. - strip_spans expanded to remove the koboSpan CSS rule and references to kobo.js from the (X)HTML files. - Basic documentation for the new code added to the HTML file. - Version number bumped to 1.3.10 to avoid any confusion, although 1.3.9b would be more accurate. In short, strip_spans is now more like a "deKoboify" routine that also happens to remove SPAN elements that have no attributes. I'm almost tempted to split it properly, into strip_spans and dekobo, but I don't really see the point. (Any opinions either way?) If anyone wants to try to poke holes in the code, the current version is attached. I think I've got it properly bulletproofed, but testing is more than welcome. EDIT: Code revised after further testing. Last edited by Rev. Bob; 04-03-2014 at 06:26 PM. |
||
04-03-2014, 04:37 PM | #612 |
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
|
I was wondering why it was in Roaming as opposed to, say, Local (where I looked first).
|
04-03-2014, 04:39 PM | #613 | |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Quote:
I don't know who, but you never know, there's bound to be someone. |
|
04-03-2014, 05:11 PM | #614 | |
null operator (he/him)
Posts: 20,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Like many things in Windows, Roaming is also about corporate environments. That's a major source of revenue for MS, corporates pay annual support/license fees, which in part at least, subsidize things like the 13 years of free upgrades for XP that consumers enjoy(ed). BR |
|
04-03-2014, 05:39 PM | #615 | ||
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Quote:
Important stuff goes into the Roaming folder, including al config-type data. And since it is default, it happens even if you don't use a network domain. |
||
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 |