10-22-2011, 10:27 AM | #1 |
Calibre Plugins Developer
Posts: 4,679
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
[GUI Plugin] Modify ePub
This plugin offers a way to perform certain modifications to your selected ePub files without performing a calibre conversion. This plugin was created a number of months ago and has a history documented in the Development forum on this thread.
Performing an ePub->ePub conversion will enforce a number of changes to your ePub, some of which can be undesirable for some users. Examples are the rewriting of CSS, margin modifications, file splitting in undesired places, changes to directory structure etc. Instead this plugin allows a user specific subset of changes to be performed in isolation without otherwise touching the original ePub's file structure, CSS files etc. Frequently these changes have been performed manually by users either using the Tweak ePub feature (time consuming), by editing in Sigil (which introduces changes/side effects of its own), by doing ePub->ePub conversions, or by saving to disk and reimporting into calibre. Users may also find it useful to install the Quality Check plugin, which offers the ability to identify ePubs in your library which qualify for many of the modifications this plugin can make. Refer to the Help file accessed from the plugin dialog or below for full details on each of the modification options and when you might use them. Main Features:
Special Notes:
Paypal Donations: Last edited by kiwidude; 09-30-2024 at 05:12 AM. Reason: New release |
10-22-2011, 07:45 PM | #2 |
US Navy, Retired
Posts: 9,867
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Excellent, it will now be easier to refer folks to this plugin.
|
Advert | |
|
10-23-2011, 12:22 AM | #3 |
Addict
Posts: 294
Karma: 7742186
Join Date: Apr 2007
Location: Idaho, USA
Device: Various PalmOS PDAs, Android Phones, Sharper Image Literati
|
Here's a feature request, a function to edit or remove text color settings in the stylesheet.css file. I spent a lot of time trying different converters from epub to Mobi but none of them would get rid of what had the text locked to black (actually a really really dark grey). Finally, in response to a post in the epub forum, I was pointed to Sigil and looking for references to color in stylesheet.css. I found three instances of color: #231F20; deleted them and saved. Then the book converted without the text color locked.
I figure the best setup would be to find each color setting and show an example of what changing or removing each setting will do. Might not want to remove *all* the color settings, in this book the TOC links and chapter headings are set to "blue" while the rest of the text was 231F20. I left the "blue" and removed the others. Boggles me why anyone would set a color to look like printed "black" ink when black text is the default on readers and reader software. I read on my LED screen phone in white on black because it improves the battery life a bunch VS black on white. Black pixels on LED screens use zero power, VS white pixels on LCD using zero power, other than the backlight shining through. No backlight on LED. |
10-23-2011, 12:54 AM | #4 |
US Navy, Retired
Posts: 9,867
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Kiwidude, let me state it a little simpler. It would be nice if you could add the option to remove text color and remove background color to the plugin.
Last edited by DoctorOhh; 10-23-2011 at 01:16 AM. |
10-25-2011, 06:51 PM | #5 |
Calibre Plugins Developer
Posts: 4,679
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@bizzybody/dwanthny - modifying the css via this plugin is one of those things I personally have avoided to date, though I guess Idolse must be doing with his additions to this plugin. It has to be done in a bulletproof way while minimising the changes to the css, which means not using third party css parsing code for instance. It should be possible using regular expressions but needs careful application and a lot of testing. I want people to have confidence that when they use this plugin it lives up to its billing of making the least changes possible to do their task, instead of the potential gotchas associated with alternatives.
You have to handle potentially mutiple css files, and also inline css as well... If I do take the leap at some point, certainly stripping colors could be an option to support. I would add to that wish list things options like line-height, letter-spacing and font-family too, no doubt there are others I've forgotten. |
Advert | |
|
10-25-2011, 09:45 PM | #6 | |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
I think the trick would be to apply all the css modifications at once though, so it would require a bit of a re-design of the current function - basically a top level modify css, then a bunch of sub-functions - sort of like heuristics. |
|
10-26-2011, 10:15 PM | #7 |
Enthusiast
Posts: 33
Karma: 1010
Join Date: Jun 2011
Device: none
|
I'm quite naive here... but I noticed that when I run the plugin I get:
Looking for non dc: elements in manifest Removing child: {http://www.idpf.org/2007/opf}meta After I've modified the ePub, the result persists when I again run the plugin. Why is that? What have I overlooked? |
10-27-2011, 03:58 AM | #8 |
Calibre Plugins Developer
Posts: 4,679
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@Magnus - what "result persists"are you referring to? Send me a PM with a link to the ePub and more detail on what it is doing the you don't expect it to.
|
11-02-2011, 09:37 AM | #9 |
Groupie
Posts: 156
Karma: 10001
Join Date: Feb 2011
Device: sony
|
Glad to see this made it to prime time! Thanks guys!
I looked at the issue of line spacing a while ago and discovered that a popular technique for setting line spacing is to manipulate the font size (set the paragraph class to, say, font-size 1.3em, line-spacing 1, then span all the text blocks with a font-size .75 em ) making it really hard to 'fix'. |
11-05-2011, 12:29 PM | #10 |
Addict
Posts: 385
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
It'd be really great to have the possibility of updating the jacket with all the metadata, including tags.
Sometimes I change the tags and I would like to update the whole epub jacket without doing a conversion. |
11-05-2011, 01:31 PM | #11 |
Calibre Plugins Developer
Posts: 4,679
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Ummm... whats wrong with the add/replace metadata jacket option that is already in there?
|
11-05-2011, 03:17 PM | #12 | |
US Navy, Retired
Posts: 9,867
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
|
|
11-06-2011, 06:29 AM | #13 |
Addict
Posts: 385
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
|
|
11-06-2011, 07:47 AM | #14 | |
Enthusiast
Posts: 26
Karma: 22
Join Date: May 2011
Device: Kindle 3
|
Quote:
Steps to reproduce:
Hope this helps |
|
11-06-2011, 08:27 AM | #15 | |
US Navy, Retired
Posts: 9,867
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
After I follow your steps on a book the first three lines of the content.opf file are as follows. But I get no error no matter how many times I try the above steps nor does it matter on what books I may try it on. I guess I have no books that meet the criteria needed to reproduce this error. Code:
<?xml version="1.0" encoding="UTF-8"?> <package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="uuid_id"> <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dcterms="http://purl.org/dc/terms/" Last edited by DoctorOhh; 11-06-2011 at 08:30 AM. |
|
Tags |
modify epub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Quality Check | kiwidude | Plugins | 1204 | 10-23-2024 01:07 PM |
[GUI Plugin] Manage Series | kiwidude | Plugins | 167 | 07-28-2024 03:07 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 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 |