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 06-13-2012, 08:33 PM   #166
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127837858
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hoods7070 View Post
Yes, that's proved a pretty big problem for me because unfortunately I converted a lot of my books when I first started and lost nearly all my section breaks. It's a pity those aren't marked up consistently in all books with characters or a break code instead of paragraph codes. The upside of my mess-ups is that I've go to know Calibre and Sigil a whole lot better. By the time I've finished wading through all my books I will be half educated.

Yes, you guessed, after a superficial glance to make sure lines had been removed and indents added I deleted the original-epubs. That was some time ago - I've only just discovered the extent of the damage I've done after reading several converted books.
It's things like this that makes me not advocate ePub > ePub conversations. Things can go wrong and if you don't notice it and think all is well and get rid of the original ePub, you then have a botched ePub that you can't go back and fix as easily as you could have before the conversion. It's best to do the fixes yourself by hand using a good text editor and Firefox or Sigil. I've been using a combination of Sigil, Notepad++, Firefox, and FlightCrew to edit ePub that Calibre has converted. Most publisher ePub, I leave out Sigil as the way I work in Notead++ is easier for me. But when I am needing to do things like rename a bunch of XML files, Sigil helps with that.
JSWolf is offline   Reply With Quote
Old 06-14-2012, 06:08 AM   #167
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
I've done a variety of things - I use anything from Sigil to WordPerfect and Serif PagePlus for my editing. Never mind - I truly believe the best way to learn anything is trial and error - you don't forget the lessons hardest learned!
Hoods7070 is offline   Reply With Quote
Advert
Old 06-15-2012, 09:40 AM   #168
GeckoFriend
Guru
GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.
 
GeckoFriend's Avatar
 
Posts: 614
Karma: 1164945
Join Date: Jan 2012
Location: SF Bay Area, California, USA
Device: iPhone 7+, iPad Mini4, Kindle Voyage
Question Modify ePub Failed

I haven't had consistent results using this plugin to insert or replace covers recently. Sometimes it works, sometimes not. This is the log from the latest try:

Spoiler:
calibre, version 0.8.56
ERROR: Modify ePub failed: No ePub files were updated

Modify ePubs
Logfile for book ID 7934 (Rachel's Totem / Harte, Marie)
7934
Modifying: C:\Users\Rebekah\AppData\Local\Temp\calibre_0.8.56 _tmp_wufedv\paleuz_modify_epub\7934.epub
Adding or updating jacket
Manifest item added: jacket.xhtml (calibre_jacket)
Spine item inserted: calibre_jacket at pos: 0
Insert or replace cover
...Looking for guide cover reference
Found guide cover reference to: cover.html
Related manifest item id: cover
...Looking for meta cover
Found meta tag with cover id: cover-image
Meta item removed: cover
...Looking for other.ms-* guide references to clean out
...Working with possible existing cover: cover.html
Guide reference removed: cover.html
...Looking for TOC navpoint for this cover
...Inspecting old cover for removal
Cover page contains only this image so can be deleted
Manifest item removed: cover.html (cover)
Spine itemref removed: cover
Checking safe to remove cover image: OEBPS/images/cover.png
Rachel's Totem - ERROR: Traceback (most recent call last):
File "calibre_plugins.modify_epub.modify", line 62, in process_book
File "calibre_plugins.modify_epub.modify", line 175, in _process_book
File "calibre_plugins.modify_epub.modify", line 703, in _insert_replace_cover
File "calibre_plugins.modify_epub.covers", line 63, in insert_or_replace_cover
File "calibre_plugins.modify_epub.covers", line 296, in _remove_old_cover_if_safe
File "calibre_plugins.modify_epub.covers", line 253, in _find_item_for_cover_image
File "calibre_plugins.modify_epub.container", line 751, in get_page_image_names
File "calibre_plugins.modify_epub.container", line 209, in get_parsed_etree
File "calibre_plugins.modify_epub.container", line 197, in get_raw
KeyError: u'OEBPS/jacket.xhtml'

ePub not changed after 0.37 seconds


Can someone tell me why this didn't work?
GeckoFriend is offline   Reply With Quote
Old 06-15-2012, 09:50 AM   #169
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,600
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@GeckoFriend - I can guess what the problem is, it is another permutation of interactions between different options (and obviously a bug in the plugin).

You have ticked the "Add/replace jacket" option at the same time as "Insert/replace cover". If it happens to be a book that didn't previously have a jacket, then the code will hit the error you see.

To avoid the error, just run Modify ePub twice - the first time without Insert/replace cover ticked. I'll push a fix tonight when I get home to verify it is the case. I don't add jackets myself so didn't catch it.
kiwidude is offline   Reply With Quote
Old 06-15-2012, 11:17 AM   #170
GeckoFriend
Guru
GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.GeckoFriend ought to be getting tired of karma fortunes by now.
 
GeckoFriend's Avatar
 
Posts: 614
Karma: 1164945
Join Date: Jan 2012
Location: SF Bay Area, California, USA
Device: iPhone 7+, iPad Mini4, Kindle Voyage
@kiwidude

Thanks; that worked and I even understand your answer
GeckoFriend is offline   Reply With Quote
Advert
Old 06-15-2012, 03:34 PM   #171
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,600
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
v1.2.5 Released

Changes in this release:
  • Bug fix for when using the Add/replace jacket and Insert/replace cover options together if book has no jacket currently
kiwidude is offline   Reply With Quote
Old 06-24-2012, 08:16 AM   #172
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,600
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
v1.2.6 Released

Changes in this release:
  • Add buttons to save and restore the current settings, to allow setting your own easily switched to defaults

This is just a simple usability enhancement for if like me you find yourself switching settings based on a particular book. I have a set of "preferred" settings that I run against new books, that I can now store using the "Save" button and retrieve using "Restore". So if I have a need to temporarily run some of the more "one-off" settings of this plugin or even just a single setting I can do so, then quickly revert back next time. The behaviour is similar to that found on the Metadata configuration dialog.
kiwidude is offline   Reply With Quote
Old 06-29-2012, 02:51 PM   #173
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,600
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
v1.2.7 Released

Changes in this release:
  • When inserting covers, if guide points to a non-existent cover href, make sure the log does not error.
  • In the CSS margin updating, if adding page declaration at it to start rather than end of CSS file to workaround Sigil bug
kiwidude is offline   Reply With Quote
Old 06-30-2012, 12:30 PM   #174
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I use the heck out of this thing. Thanks a million for all the effort!

One tiny thing I've noticed is that when using the "Remove Adobe .xpgt files and links" option, it seems to ignore any "@import url(page-template.xpgt);" line in the CSS file(s). Certainly doesn't cause any problems that I've noticed, but I wondered if it would make sense to remove that as well while removing the links and the file?

Thanks again.

Last edited by DiapDealer; 06-30-2012 at 12:35 PM.
DiapDealer is offline   Reply With Quote
Old 06-30-2012, 12:57 PM   #175
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,600
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Ahhh, that would be because it isn't a syntax I am familiar with

The Quality Check plugin will also be missing the same check for it. I'll put it on the todo list to take a look at.
kiwidude is offline   Reply With Quote
Old 06-30-2012, 01:41 PM   #176
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127837858
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
One thing that would be a good option is to be able to get rid of any @page that might be in the CSS. I always remove them when found.
JSWolf is offline   Reply With Quote
Old 06-30-2012, 06:09 PM   #177
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
@kiwidude,

Regarding page margins top/bottom and left/right...

If I have an original never-calibre-converted epub and I use the Modify Epub option called 'Rewrite CSS @page and body margins' then the mod appears to add an @page statement to the top of the css file which contains all 4 margins, i.e. top/bottom/left/right as per my calibre prefs. (if they're non-zero, that is)

However, a calibre conversion only puts the top/bottom margins in an @page and puts the left/right margins in the body class. Is this difference deliberate? If there are already L/R margins in the body class then I end up with 'double' margins?

Is it possible to summarise what margin mods are done under what circumstances.
jackie_w is offline   Reply With Quote
Old 06-30-2012, 06:57 PM   #178
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,600
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@jackie_w - I didn't write that particular feature, it was done by Idolse. The discussion on it all starts here. I've never touched it other than a couple of tweaks necessary as other bits of the plugin got refactored or if I hit issues (like I found recently of Sigil 0.5.3 "hiding" text that was inserted into a css file by this feature unless it got inserted at the top rather than the bottom).
kiwidude is offline   Reply With Quote
Old 07-01-2012, 04:19 AM   #179
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
I don't think the difference is deliberate exactly, but it wasn't one of my goals to do exactly what a Calibre conversion does either, for example it also won't modify every flow unless Calibre (or someone else) had done it previously. I do recall wondering why Calibre conversions use body for left/right instead of just using @page for everything. I know Calibre doesn't use body for top and bottom margins because that will only apply to the first and last page of a flow.

it's been a long time since I messed with this so I'd have to review the code in detail to answer this question fully. I don't think you'd get double margins from the plugin as it modifies both page and body margins - i.e. margins in body should be removed and everything would be in @page. It does sound like you're saying there may be an edge case if you run the plugin and then follow that by running a Calibre conversion. Calibre might insert the margins in the body tag whilst leaving @page alone, not sure of this, but since the whole point of the plugin is to avoid a Calibre conversion I'm not sure how critical it is. I sort of doubt this is an issue anyway as it could potentially happen with any number of retail ePubs as well and I haven't heard of Calibre doing that.

Edit:
Looks like I summarized the work I did fairly well here:
https://www.mobileread.com/forums/sho...&postcount=144

Last edited by ldolse; 07-01-2012 at 04:39 AM.
ldolse is offline   Reply With Quote
Old 07-01-2012, 04:59 AM   #180
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Because @page is not supported by lots of epub viewers.
kovidgoyal 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 04:19 AM.


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