![]() |
#1216 | |
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:
A name collision check should be regarded as mission-critical, especially given the possibility of data loss and how trivial it is to fix. If a collision is found, just set up a counter and keep testing (name)_(counter).(extension) until you find an available name. Boom, done. Last edited by Rev. Bob; 05-01-2019 at 09:46 PM. |
|
![]() |
![]() |
![]() |
#1217 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,243
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I've downloaded several books from one indie author that has the cover in titlepage.xhtml and the title page in titlepage.html. When I asked about this, her response was to blame calibre since she was using calibre to convert docx to epub and then modify epub to add the cover.
|
![]() |
![]() |
![]() |
#1218 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Actually, I take it back--I did implement a collision detection, but all it does is raise an exception and crash out of changing that book. Then I promptly forgot about it apparently...
Given the complexities of finding and changing all the possible embedded URLs I, for one, am not interested trying to implement a increment-number-name version. |
![]() |
![]() |
![]() |
#1219 | |
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:
If you’re not already dealing with those, you shouldn’t be tinkering with the plugin at all; you’re half-assing it and breaking the plugin. If you are, adding an “okay, is THIS one taken?” loop/check is an insanely simple fix. Do it right, or don’t do it at all. |
|
![]() |
![]() |
![]() |
#1220 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
I'm not sure whether this helps or hinders ...
Good news: calibre has its own utility (rename_files in calibre.ebooks.oeb.polish.replace) for changing filenames inside an epub. This is the help info: Code:
Rename files in the container, automatically updating all links to them. :param file_map: A mapping of old canonical name to new canonical name, for example: :code:`{'text/chapter1.html': 'chapter1.html'}`. I don't know how much work would be involved in getting the ME Container to use calibre.ebooks.oeb.polish.replace.rename_files. Ideally ME needs a complete overhaul to use pure calibre container functionality for everything ... but that's not a trivial exercise. |
![]() |
![]() |
![]() |
#1221 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
|
![]() |
![]() |
![]() |
#1222 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Mass Style Sheet Replace?
I have a children's book series (55+ books).
The good news is that each has an identical style sheet, different name in each The bad news is that the original style sheet doesn't look good (i.e. the way I'd like it), so I modified it. I thought maybe the Conversion process might have some options, but didn't see any Q: is there a way to do a mass replace of the style sheet? I've been editing one book at a time, but it's tedious, and if I fall into a routine I just know I'll miss something. There are also 4 fonts in the books but I'm removing them (since I removed references to them in the CSS) and just using the reader choices |
![]() |
![]() |
![]() |
#1223 |
Not Quite Dead
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
|
Here is one idea that I have not tried: The Modify ePub plug-in will work on multiple files at the same time. Among its configuration options, right next to "Remove Embedded Fonts" is an option for "Append Extra CSS."
If the plug-in appends your changed styles, the rules should separately override the previous rules. Worth a try? |
![]() |
![]() |
![]() |
#1224 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Anything is worth trying -- thanks for the idea
I tried the PI, but the checkbox for Append Extra CSS wants the file in my Calibre Defaults Directory. I tried putting my new CSS file into the one that the Preference "Open calibre configuration directory" gave me, but it didn't seem to take Any idea what "calibre Defaults" meant? |
![]() |
![]() |
![]() |
#1225 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,730
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#1226 | |
Not Quite Dead
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
|
Quote:
|
|
![]() |
![]() |
![]() |
#1227 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,730
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Took me all of 10 secs to find that with a thread search for Extra CSS. BR |
|
![]() |
![]() |
![]() |
#1228 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,730
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
And in the first post for the plugin there's this:
Quote:
|
|
![]() |
![]() |
![]() |
#1229 | |
Not Quite Dead
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
|
Quote:
|
|
![]() |
![]() |
![]() |
#1230 | ||
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,730
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() ![]() Append extra CSS is not the only option not documented there, which is odd, because that update was done by Kiwidude. In its 'defence' it does have this at then end of the page ![]() Quote:
Can you confirm the option works - i.e. it will use the extra CSS in Preferences. BR |
||
![]() |
![]() |
![]() |
Tags |
modify epub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Quality Check | kiwidude | Plugins | 1251 | 07-07-2025 09:13 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] Manage Series | kiwidude | Plugins | 167 | 07-28-2024 03:07 PM |
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 |