![]() |
#856 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82
Karma: 9402
Join Date: Jul 2009
Location: Adelaide, South Australia
Device: Kobo Libra Colour
|
excellent, thx!
![]() |
![]() |
![]() |
![]() |
#857 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
Just updated to 2.8 from 1.48 and can't update epub
I just changed the language on an epub and it will not update. The error is
Modify ePubs Logfile for book ID 111824 (Bookname / Author Name) 111824 Modifying: C:\Users\Kate\AppData\Local\Temp\calibre_hyfut4\pl _lz0_modify_epub\111824.epub Updating metadata and cover Parsing xml file: content.opf Parsing xml file: toc.ncx Looking for files to remove: [u'META-INF/calibre_bookmarks.txt'] BookName - ERROR: Traceback (most recent call last): File "calibre_plugins.modify_epub.modify", line 79, in process_book File "calibre_plugins.modify_epub.modify", line 134, in _process_book KeyError: u'strip_spans' ePub not changed after 0.19 seconds This epub did not have any bookmarks but the plugin is configured to remove bookmarks, update metadata, smarten punctuation, remove metadata covers This is the first time I've tried to use it since updating to 2.x of Calibre. |
![]() |
![]() |
Advert | |
|
![]() |
#858 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
@LadyKate: Can you make sure you have the latest version of the plugin installed. This is 1.3.12.
If that doesn't help, delete the saved settings for the plugin. To do this, open the calibre preferences, go to the "Miscellaneous" section and press the "Open calibre configuration Then go into the directory "plugins" and find the file "Modify ePub.json" and delete it. The restart calibre and try the plugin again. |
![]() |
![]() |
![]() |
#859 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
Thanks for responding davidfor. I must have needed a few more restarts of calibre. I had updated the plugins... all of them, and restarted BUT after making a couple of other changes and restarting about six times the next time I tried (which I did after almost every restart) it worked. Must have been in limbo or something. Sorry for bothering all.
Must be because it was a major update, I hadn't updated from 1.48 until tonight. |
![]() |
![]() |
![]() |
#860 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Nov 2010
Location: Where no man has gone before
Device: BQ Cervantes Touch Light
|
Hello.
Thanks for such a great plugin!. I do know nothing at all about python language (so sorry if my changes are horrible), but anyway I did an small modification to your plugin for my own personal use. This is because I wanted your plugin to remove certain files that bother me a lot within epub files. They are mostly covers with ads from webpages, or book resumes that had spanish file names and thus they were not deleted with "delete all jackets" option. I changed file "jacket.py" lines 61 ~70 to the following: Code:
def remove_all_jackets(container, log): log('\tLooking for all jackets') dirtied = False for name in list(container.name_path_map.keys()): if 'jacket' in name and name.endswith('.xhtml'): data = container.get_parsed_etree(name) if is_current_jacket(data) or is_legacy_jacket(data): log('\t Jacket removed: ', name) dirtied = True container.delete_from_manifest(name) for name in list(container.name_path_map.keys()): if 'sinopsis' in name and name.endswith('.xhtml'): data = container.get_parsed_etree(name) log('\t Sinopsis jacket found: ', name) dirtied = True container.delete_from_manifest(name) for name in list(container.name_path_map.keys()): if 'Cubierta' in name and name.endswith('.xhtml'): data = container.get_parsed_etree(name) log('\t Cubierta jacket found: ', name) dirtied = True container.delete_from_manifest(name) for name in list(container.name_path_map.keys()): if 'titulo' in name and name.endswith('.xhtml'): data = container.get_parsed_etree(name) log('\t Titulo jacket found: ', name) dirtied = True container.delete_from_manifest(name) return dirtied So, would you be so kind to consider in next version (or if you feel bored enough) to add one option to automatically delete certain files that match a given name?. This can be useful for many countries where english is not the main language. Thanks in advance and greetings from Spain. Last edited by zephyrot; 11-27-2014 at 07:54 PM. Reason: used "quote" instead of "code" LOL |
![]() |
![]() |
Advert | |
|
![]() |
#861 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
I don't know about others, but I would feel uncomfortable about including something like this. There is to big a risk of hitting something that shouldn't be removed. Maybe if there was an option to specify a list of names or a regex for the files to be removed. I'm also not exactly sure how much of a need there is. |
|
![]() |
![]() |
![]() |
#862 | |
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:
|
|
![]() |
![]() |
![]() |
#863 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I'm not in charge either but, knowing a bit of Spanish
![]() Last edited by Terisa de morgan; 11-30-2014 at 05:07 AM. Reason: Typos |
![]() |
![]() |
![]() |
#864 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Nov 2010
Location: Where no man has gone before
Device: BQ Cervantes Touch Light
|
![]()
Hi Davidfor, Rev. Bob and Terisa de Morgan.
Thanks for your kind concern, I do see and understand your points so let me give you more background on my particular taste. As per my knowledge, Calibre don't detect, edit, update or remove jackets whose filename is written in another language rather than english. This means that I have to manually check each and every file with Sigil or Calibre "Edit epub" tool to remove such duplicated jackets. This can be really tiresome ![]() As I said I understand your view, but my intention is explicitly this: "Removing certain named files to avoid having duplicate covers and synopsis". Spanish filenames are used only for certain files that calibre will generate anyway, so I'm not really concerned about potentially deleted files. It is very unlikely and "original_epub" can be used to bring the missing pages back. A list is needed to manually set which files to remove, though. To be honest, I will probably die from age before finishing reading half of them, given that my little fiddling around with Kiwidude plugin with a limited set of books was successful I'm willing to apply it to all my books. I just though that this could be useful for someone else but I can't know if there is much request about this feature. Davidfor: Thanks for your kind update. I had no idea about how to code with Python. Since my first try worked perfectly I left it as is, but I will gladly update with your suggestion. Oh, at last I regret to say that I forgot to use a real nice word that should be mandatory when requesting things: "Please". Thank you all and have a nice weekend ![]() ![]() Edit: I overlooked a particular point on Davidfor post. Yes, I do think that this needs to have an option to select what filenames to remove if found, we just can't leave this as is. I'm sorry I missed it. I have added the clarification on the post. Last edited by zephyrot; 11-28-2014 at 11:29 AM. Reason: Clarification. |
![]() |
![]() |
![]() |
#865 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
@zephyrot: Yes, if something like this is implemented, the user should select the name: I would never have a file called "cubierta" but "sobrecubierta", neither "sinopsis" but "resumen", for example.
But the main point is: the removed file isn't "sobrecubierta" in English, but the standard name and extension (that's important: jacket.xhtml works, jacket.html doesn't) that calibre uses for including this jacket. You're not removing something which is a normal part of the book, but something calibre has added. |
![]() |
![]() |
![]() |
#866 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,785
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
That would be a nice option to have Modidy ePub present us with a list of files in the ePub for us to select which ones we want removed and then they can be removed from the OPF and NCX ToC (if there).
|
![]() |
![]() |
![]() |
#867 | |
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 the goal is to avoid duplicates, because Calibre is making duplicate files, why not remove the Calibre-made files? That should be much easier to control. |
|
![]() |
![]() |
![]() |
#868 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,737
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Also just because a file is named something doesn't guarantee that's what it is, I'm sure I've seen epubs where the Title.xhtml file contained the half title, title and colophon. ![]() It would be nice if Modify had an option to put the jacket.xhtml after the titlepage.xhtml (as it does now) or as the last file in the book. I won't offer my hack - because it removes functionality that others undoubtedly use. BR |
|
![]() |
![]() |
![]() |
#869 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,785
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I have no need for a jacket. So I remove them if they exist. So to me, it matters not where the jacket is placed. I'll remove it.
Another thing I remove the the page of reviews we sometimes get. I already have the book, I don't need to read review snippets. |
![]() |
![]() |
![]() |
#870 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,737
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Jon, as you are with jackets so am I with covers, the reason I first used Modify was to remove them. I like to have a jacket with all the metadata in the book, because the readers I have on my Tab are limited to displaying the DC elements only.
|
![]() |
![]() |
![]() |
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 |