![]() |
#1201 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,760
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#1202 | |||
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 108
Karma: 810
Join Date: Jul 2012
Device: Kobo
|
modify epub - jumps to top of book list on completion
Quote:
Quote:
Quote:
Although both approaches suggested by ILoveJedd and BetterRed provide an easy work-around, it still seems a strange and unnecessary glitch. Using the arrow keys (or scrolling down to find the still-highlighted book) works if I'm not distracted by something else and remember what it was I was doing. I'd prefer to not disable the "prompt to save ePubs" functionality because a) sometimes I've made a mistake and decide not to save the modified ePub, and b) auto-saving a problematic modification can have a domino effect by deleting e a prior original version (just ignore this last comment 'b' if not self-explanatory as explaining would just distract from the main consideration). Hopefully there is an easy answer to removing the glitch itself. Last edited by Rob557; 02-26-2019 at 01:12 PM. |
|||
![]() |
![]() |
![]() |
#1203 | |
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:
While it’s true that some EPUB 3 books are basically “EPUB 2 with a couple of tiny changes,” many actually take advantage of the enhanced capabilities of the EPUB 3 format. Those simply cannot be automagically downgraded to EPUB 2; such a change requires complex intervention which is far beyond the scope of the Modify EPUB plugin. So, you can wish for it all you like, but you’d probably have better luck looking for dedicated conversion software or pleading for someone to create an entirely new plugin for that specific task. |
|
![]() |
![]() |
![]() |
#1204 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Apr 2019
Device: SkyEpub
|
Great Plugin! This is very helpful!
But I have 2 more questions about it: 1) Is there a feature to remove html files with a certain name (e.g.: Last-chapter.xhtml)? 2) Is there a feature to change the page progression direction from rlt to ltr inside the opf file? (changing: <spine toc="ncx" page-progression-direction="rtl"> to <spine toc="ncx">) or vice versa (ltr to rtl)? Thank you so much in advance. |
![]() |
![]() |
![]() |
#1205 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,760
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
2. No But you can ue the Calibre editor to edit these sorts of things since it's very easy to do. |
|
![]() |
![]() |
![]() |
#1206 | |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Apr 2019
Device: SkyEpub
|
Quote:
Appreciated. |
|
![]() |
![]() |
![]() |
#1207 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,635
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#1208 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
I haven't been paying much attention to who's maintaining this one lately, but I found a bug in the plugin while working on a private project.
_remove_files_if_exist(), used for 'Remove iTunes files', 'Remove calibre bookmark files' and 'Remove OS artifact files' will only remove the first file found from each list. Here's a fixed version that removes them all as (I assume) it should work. The change is the addition of a dirtied flag instead of returning immediately on file remove. Code:
def _remove_files_if_exist(self, container, files): ''' Helper function to remove items from manifest whose filename is in the set of 'files' ''' dirtied = False self.log('\tLooking for files to remove:', files) files = [f.lower() for f in files] for name in list(container.name_path_map.keys()): found = False if name.lower() in files: found = True if not found: for f in files: if name.lower().endswith('/'+f): found = True break if found: self.log('\t Found file to remove:', name) container.delete_from_manifest(name) dirtied = True return dirtied |
![]() |
![]() |
![]() |
#1209 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
@Bilal93 approached me to add some features to Modify ePub. Which I have.
![]() Bilal93 has asked that I also make a public version containing the added features in case others find them useful. Features added:
I also bumped the version number. I leave it up to the community whether these features are worth including in the general release. EDIT: This version also addresses the _remove_files_if_exist() issue from my previous post. Last edited by JimmXinu; 05-01-2019 at 06:58 PM. Reason: Remove obsolete test versions |
![]() |
![]() |
![]() |
#1210 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,635
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Thank you very much.
|
![]() |
![]() |
![]() |
#1211 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Works for me on my existing settings, I also checked the html rename option.
Would it be possible to sneak in another feature : if 'Add/replace metadata jacket' is checked allow another option - 'Put jacket at end of book' - and act accordingly ![]() As a general principle I think we should aim to replace the existing version if no adverse issues arise. BR |
![]() |
![]() |
![]() |
#1212 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
I hesitate on that one primarily for the 'slippery slope' factor.
![]() And because my biggest incentive to do it is because the empty space in the 'Jacket' section is unsightly. ![]() |
![]() |
![]() |
![]() |
#1213 |
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 think I have some “unpretty” mods on my machine that haven’t been merged into a release version yet. I’ll try to take a look in the next couple of days and, if so, splice them into this new edition.
Oh, and it might be worthwhile to add a reciprocal option for that extension change (Change *.xhtml to *.html), and it definitely strikes me as a good idea to include .htm and .xht in the mix. (Standardizing on .jpg/.jpeg would also be handy, and a generalized routine should be able to handle pretty much any “change this extension to that one” configuration.) Granted, that requires some checking for duplicate filenames, but I’d hope you’ve already got that built into the .html to .xhtml routine… Last edited by Rev. Bob; 05-01-2019 at 07:24 AM. |
![]() |
![]() |
![]() |
#1214 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 840
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
|
|
![]() |
![]() |
![]() |
#1215 | ||
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Here's a version that also updates <guide><reference> tags pointing to renamed .xhtml files. Quote:
And actually, no I didn't do a name collision check. In theory, it would be nice, but seriously, if your epub has chap01.htm and chap01.xhtml in the same dir in the same epub, you have bigger problems. EDIT2: Implementation rejected by the current maintainer. Test version removed. Last edited by JimmXinu; 05-03-2019 at 09:49 AM. |
||
![]() |
![]() |
![]() |
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 |