Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 05-10-2012, 02:20 PM   #106
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Red face Not working (on previous)

Quote:
Originally Posted by kiwidude View Post
Changes in this release:
  • Fix for Remove xpgt files and links to remove the xpgt file from the manifest
  • When performing any Modify action, update the last_modified column in calibre for the book.
Thanks to theducks for finding the oversight in the "Remove xpgt file" feature. If you have used that feature (it was only added a few days ago) then there is a simple fix for the books that would be affected as mentioned above. In Quality Check run the "Check manifest files missing" check and it will tell you which books have entries in the OPF manifest for which the physical files do not exist in the ePub. Then in this Modify ePub plugin for those books, use the "Remove missing file entries from manifest" option.
I ran the Quality check for missing Manifested files.
It identified those that I had previously removed the xpgt stylesheet

I selected them and ran Modify ePub (current version. verified via internal change log)
It Ran, asked to allow update, Went to view log; ABEND (crash. did not copy down the number).
I was going to capture (copy to clipboard) the Log because the XPGT entry was still not being removed from the Manifest.

BTW could the prompt be changed to Missing manifested files
theducks is online now   Reply With Quote
Old 05-10-2012, 02:50 PM   #107
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
No *functionality* in this plugin is going to cause an abend as it is 100% Python. The only things that can cause an abend I can think of is something related to the Qt dialogs or this running as a background job, but none of that has been changed forever. I did get a PM from one user saying they had a memory error running against 566 books, which didn't overly surprise me (they weren't using Quality Check, and just relying on Modify ePub to only change what it needed to).

It definitely removes the xpgt file now (for me at least) - if you have a problem epub which it isn't feel free to PM me a link.
kiwidude is offline   Reply With Quote
Old 05-10-2012, 06:24 PM   #108
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by kiwidude View Post
No *functionality* in this plugin is going to cause an abend as it is 100% Python. The only things that can cause an abend I can think of is something related to the Qt dialogs or this running as a background job, but none of that has been changed forever. I did get a PM from one user saying they had a memory error running against 566 books, which didn't overly surprise me (they weren't using Quality Check, and just relying on Modify ePub to only change what it needed to).

It definitely removes the xpgt file now (for me at least) - if you have a problem epub which it isn't feel free to PM me a link.
Something went way south on my system a short time later (clicking eithe mouse button appeared as a right-click..Everywhere). A reboot fixed things

Sending you a file I 'cleaned of Adobe' according to the log. The Manifest shows the XPGT file.
Just remove the Zip extension.

BTW, if I do a batch update, the Modified Date does not get bumped, but it does if I only do 1 file.
theducks is online now   Reply With Quote
Old 05-10-2012, 07:10 PM   #109
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by theducks View Post
BTW, if I do a batch update, the Modified Date does not get bumped, but it does if I only do 1 file.
I've replicated the modified date issue. It seems my "close and cleanup" code is not consistently being called where I was doing the update - which was totally weird. I think there is a funky threading/timing issue to do with the Qt's QProgressDialog. I've rearranged the code for the next version so that should be fixed.
kiwidude is offline   Reply With Quote
Old 05-11-2012, 02:15 AM   #110
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by kiwidude View Post
@davidfor - I'm afraid that functionality is just way too niche to consider for this plugin. There is such a small range of use cases where it would work. I would suggest the majority of users get their ebooks from a wide range of sources/publishers, which makes it impossible to do such a substitution without doing irreperable harm to the ebook.

I think you would be better off having a bespoke plugin that does specifically just this function. Or possibly even having it as a Sigil plugin (though this is not possible yet, but might be one day if it ever gets a plugin API).
I'll have to accept that. I though there would be more interest, but there obviously isn't.

As to a plugin or something to do this, maybe in the future. At the moment, I'll stick with my hacked version of Modify ePub
davidfor is offline   Reply With Quote
Old 05-13-2012, 05:25 PM   #111
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
New beta version

A few new features for people to play with and offer feedback on (plus the fix for the modified date column issue reported above):
  • Remove broken cover images - calibre epub conversions will frequently result in leaving behind an html page that contains nothing but a broken image link on it. This option searches for specifically that situation (an html page containing an image tag that is broken) and if there is no other text in the body of the page then the page is removed completely from the epub.
  • Remove broken TOC entries in NCX - a partner for a new feature in Quality Check, which identifies broken links in your TOC and removes the entry in the NCX file. Again these are often caused by calibre conversions due to issues with its covers logic but could also be from careless tweak/Sigil editing.

As always, feedback welcomed.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_NewOptions.png
Views:	439
Size:	34.0 KB
ID:	86431  

Last edited by kiwidude; 06-18-2012 at 01:45 PM.
kiwidude is offline   Reply With Quote
Old 05-17-2012, 05:25 AM   #112
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
v1.1.6 Released

Changes in this release:
  • Bug fix for the last_modified column not being updated if multiple books modified
  • Add a "Remove broken cover images" option to remove html pages which contain only an image tag to a broken image.
  • Add a "Remove broken TOC entries in NCX" option to remove ncx entries that point to non-existent html pages
  • Fix for remove unused images to include svg and bmp files as possible image extensions

Anyone who downlaoded the beta version above should be sure to force the download of the latest version which has the same version number, for the unused images fix.
kiwidude is offline   Reply With Quote
Old 05-17-2012, 08:35 AM   #113
iandix
Addict
iandix is far more humble than you.iandix is far more humble than you.iandix is far more humble than you.iandix is far more humble than you.iandix is far more humble than you.iandix is far more humble than you.iandix is far more humble than you.iandix is far more humble than you.iandix is far more humble than you.iandix is far more humble than you.iandix is far more humble than you.
 
iandix's Avatar
 
Posts: 295
Karma: 109308
Join Date: Dec 2009
Location: NSW Australia
Device: nook touch a Nook 3g (rooted) and a nookcolor (rooted)
I'm now getting this error with Modify ePub running on Linux Ubuntu 12.04


Modify ePubs
Traceback (most recent call last):
File "site.py", line 58, in main
File "site-packages/calibre/utils/ipc/worker.py", line 191, in main
File "site-packages/calibre/utils/ipc/worker.py", line 135, in arbitrary_n
File "importlib/__init__.py", line 37, in import_module
File "site-packages/calibre/customize/zipplugin.py", line 150, in load_module
File "calibre_plugins.modify_epub.jobs", line 14, in <module>
File "site-packages/calibre/customize/zipplugin.py", line 150, in load_module
File "calibre_plugins.modify_epub.modify", line 21, in <module>
ImportError: No module named covers
iandix is offline   Reply With Quote
Old 05-17-2012, 08:36 AM   #114
abigfan
Junior Member
abigfan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2011
Location: USA
Device: Libre Pro, Nook Tablet
Unhappy Not working after update

I used it this morning, then i updated it. Now i doesn't work. I am running Windows XP. Here is the error message:


Modify ePubs
Python function terminated unexpectedly
No module named covers (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 191, in main
File "site-packages\calibre\utils\ipc\worker.py", line 135, in arbitrary_n
File "importlib\__init__.py", line 37, in import_module
File "site-packages\calibre\customize\zipplugin.py", line 150, in load_module
File "calibre_plugins.modify_epub.jobs", line 14, in <module>
File "site-packages\calibre\customize\zipplugin.py", line 150, in load_module
File "calibre_plugins.modify_epub.modify", line 21, in <module>
ImportError: No module named covers

Please Help. I like this plug in.

Last edited by abigfan; 05-17-2012 at 08:38 AM.
abigfan is offline   Reply With Quote
Old 05-17-2012, 08:43 AM   #115
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Sorry - repeat post - didn't see the 2 previous ones. I am using WinXP.

Last edited by jackie_w; 05-17-2012 at 08:46 AM.
jackie_w is offline   Reply With Quote
Old 05-17-2012, 08:58 AM   #116
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
v1.1.7 Released

Changes in this release:
  • Re-release of 1.1.6 to cater for missing file

Sorry folks, I rushed the release out this morning before a meeting. It had some work in progress code for a future release in there which shouldn't have caused a problem ... except for if I missed a file out... doh...
kiwidude is offline   Reply With Quote
Old 05-17-2012, 10:43 AM   #117
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Thanks for this. The 'remove unused images' and 'remove broken TOC entries' were very useful when splitting a book bundle omnibus into single books.

I used Sigil to remove unused css files physically and from the opf <manifest> and (for completeness) other references to missing files from the opf <guide>. This was easy enough, but if you were looking for potential extra work features ...
jackie_w is offline   Reply With Quote
Old 05-17-2012, 12:44 PM   #118
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@jackie_w - cleaning up after splitting omnibus editions is *exactly* the primary use case I had in mind for the remove unused images feature in particular. That and the situation where you have a duplicate inner cover and in Sigil you remove the html page but forget to remove the associated image as well...

Out of curiosity, what do you mean by an "unused" css file - I'm assuming you mean one that is not linked from html pages? How often does that happen?

Unused guide entries would be no great difficult, would need a QC check for it as well. Again not sure how prevalent it is/what causes it...
kiwidude is offline   Reply With Quote
Old 05-17-2012, 02:01 PM   #119
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by kiwidude View Post
Out of curiosity, what do you mean by an "unused" css file - I'm assuming you mean one that is not linked from html pages? How often does that happen?
I meant exactly that. I think it happens often with these book bundles (although I don't own very many). The individual books seem to be lumped into one big epub but each references its own css file, i.e. 6-book bundle probably has 6 css files. I suppose you could do a calibre epub-epub conversion before starting to split the bundle which would create one big css file from the constituent css's, but it wouldn't be my preferred method as there would be a lot of unused css rules in each individual book and it's not really in the spirit of 'Modify Epub'.

Quote:
Originally Posted by kiwidude View Post
Unused guide entries would be no great difficult, would need a QC check for it as well. Again not sure how prevalent it is/what causes it...
Based on the bundle I split earlier today... there were 3 overall html files -- cover, title page and inline TOC (which linked to start of each book). All 3 were referenced in the <guide>. For each individual book I chose to keep the overall cover (so I could easily substitute the image later) but I removed the other 2 html files in Sigil. Sigil automatically removed the corresponding <manifest> items but not the <guide> items. Perhaps it should have done. I don't even know whether the <guide> is important if you only use epubs, however, my obsessiveness wouldn't let me ignore it In any case I'm not sure where I'd use it other than when splitting book bundles.

In fact, I can almost imagine a spin-off plugin aimed solely at splitting bundles or other omnibuses (omnibi???) which let you select the first html file for each individual book then did the split plus all necessary clean-up operations.

Do we know any talented developers who are kind and generous enough to create such a useful item?
jackie_w is offline   Reply With Quote
Old 05-17-2012, 02:04 PM   #120
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,285
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by jackie_w View Post
In fact, I can almost imagine a spin-off plugin aimed solely at splitting bundles or other omnibuses (omnibi???) which let you select the first html file for each individual book then did the split plus all necessary clean-up operations.

Do we know any talented developers who are kind and generous enough to create such a useful item?
As a matter of fact...

I've been thinking about an epub extractor/splitter ever since it was suggested on the thread for my EpubMerge plugin. And I've had some time work on it this week.

Don't expect it for a bit yet, but there is something coming.

Jim
JimmXinu is offline   Reply With Quote
Reply

Tags
modify epub

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1171 03-23-2024 05:18 AM
[GUI Plugin] Open With kiwidude Plugins 402 03-16-2024 11:44 PM
[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


All times are GMT -4. The time now is 11:46 AM.


MobileRead.com is a privately owned, operated and funded community.