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 12-31-2013, 03:09 PM   #541
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
you need to tick "preserve aspect ratio" in the epub output preferences of calibre, then that issues goes away.
I only learned recently, from another query, that the modify epub plug in looks there for information about how to size & shape the cover image that it is inserting.
cybmole is offline   Reply With Quote
Old 12-31-2013, 05:25 PM   #542
jcloggins
Junior Member
jcloggins began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2009
Device: Sony
Quote:
Originally Posted by cybmole View Post
you need to tick "preserve aspect ratio" in the epub output preferences of calibre, then that issues goes away.
I only learned recently, from another query, that the modify epub plug in looks there for information about how to size & shape the cover image that it is inserting.
Thanks.

That may come under the heading of "not exactly obvious " but it does fix the problem
jcloggins is offline   Reply With Quote
Advert
Old 01-03-2014, 12:07 PM   #543
Huisie
Enthusiast
Huisie doesn't litterHuisie doesn't litter
 
Posts: 27
Karma: 100
Join Date: May 2010
Device: none
I am currently sorting a library of over 7000 books.
I have been using this plugin in combination with Quality Check.
It is a time consuming process:
- run a Quality Check search, such as "Check having any jacket", say
- run the appropriate Modify ePub option against those books selected
- this can take some time depending on how many epubs are found
- rinse and repeat through the various Quality Check options

I was wondering whether I can ignore Quality Check to speed things up:
- tick off several options in this plugin
- run it against all epubs with this plugin only making changes as required?

Would it only apply changes as selected to those epubs requiring them, or would it make wholesale changes and butcher them? The reason I ask what is likely a dumb question is that Modify ePub seems to give the option to select more than one options at a time.
Huisie is offline   Reply With Quote
Old 01-03-2014, 01:57 PM   #544
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
Huisie - the vast majority of the Modify ePub options are perfectly safe to "always run", in that they look for a particular condition to be present in the ePub and if found does the option otherwise does nothing.

Personally I have about a dozen options checked that I run on most of the ePubs that I import. And with those options checked I have never had a problem.

However there are a few options that in theory you might not want to do on every epub. For instance "Smarten punctuation" - if the ePub already has smart quotes, I think there is a risk that this option will (due to the flaws that exist in its algorithm) result in some quotes being changed from correct to incorrect.

Certainly options like "Remove all metadata jackets", "Update metadata", removing known artifacts etc should all be perfectly safe to run on any epub...
kiwidude is offline   Reply With Quote
Old 01-08-2014, 03:41 AM   #545
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by kiwidude View Post
Cybmole, it is all to do with your general defaults, and what profile you have chosen for your device. .
I thought I understood this but now I am not so sure. Where is stored " what profile I have chosen for my device"

Looking again at how that works it seems that calibre does the choosing not me. I can see e.g. the Sony & the tablet device drivers listed under plug-ins but I see no way to force the use of one specific one, except by disabling the hundreds of others ?

does calibre" remember" the last device connected & share that info with the modify epub plug-in

if I connect device A,eject it, modify a book, connect device B, eject it, restore previous book version, modify same book, will I always get the same result. will I get same results if I modify while the device is still connected. Can you explain the interactions please.
cybmole is offline   Reply With Quote
Advert
Old 01-08-2014, 04:55 AM   #546
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,458
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by cybmole View Post
I thought I understood this but now I am not so sure. Where is stored " what profile I have chosen for my device"
@cybmole - could it be the one in Conversion->Page Setup? I'm not very good at the device stuff - but its one place I know where the words 'profile' and 'device' are used in the same context.

BR
BetterRed is offline   Reply With Quote
Old 01-08-2014, 05:14 AM   #547
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
thanks - that's it !

sometimes these things are so well hidden, why are all device related settings not filed under device, or output, or at least cross reference ???

in where you say there is the choice of sony or sony T3

( and for once I did try a search of the user manual, before posting, but if its in there, it's equally well disguised! )
cybmole is offline   Reply With Quote
Old 01-08-2014, 09:48 AM   #548
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 cybmole View Post
sometimes these things are so well hidden, why are all device related settings not filed under device, or output, or at least cross reference ???
These are conversion Profiles and not ALWAYS limited to a specific device.

Note the input profile: You may not HAVE a brand X, but you bought books from the brand X store that were custom configured for that device. For a great conversion, those customizations need to be negated first.
Kovid seems to have thought it out well. You can have a 'default' (preferences), but still override those for an individual book. No YoYo settings in Preferences with this scheme
theducks is offline   Reply With Quote
Old 01-10-2014, 12:11 AM   #549
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
According to the instructions in the commandline/readme.txt, I run the script by using:
Code:
calibre-debug -e me.py --help
According to:
Code:
man calibre-debug
and http://manual.calibre-ebook.com/cli/calibre-debug.html I should instead use:
Code:
calibre-debug me.py -- --help
(the -e isn't necessary.)

And using
Code:
calibre-debug -e me.py --help
just gets me the help for calibre-debug. Or else using the options, it gets me an error (I assume calibre-debug has no idea what --smarten-punctuation is):
Spoiler:
Code:
Traceback (most recent call last):
  File "site.py", line 58, in main
  File "site-packages/calibre/debug.py", line 269, in main
  File "site-packages/calibre/debug.py", line 187, in run_script
  File "site-packages/calibre/customize/ui.py", line 15, in <module>
  File "site-packages/calibre/customize/builtins.py", line 675, in <module>
  File "site-packages/calibre/devices/kobo/__init__.py", line 4, in <module>
KeyboardInterrupt

So I found the instructions to use the extra "--" and it works just fine.
eschwartz is offline   Reply With Quote
Old 01-13-2014, 06:39 AM   #550
Huisie
Enthusiast
Huisie doesn't litterHuisie doesn't litter
 
Posts: 27
Karma: 100
Join Date: May 2010
Device: none
Quote:
Originally Posted by kiwidude View Post
Huisie - the vast majority of the Modify ePub options are perfectly safe to "always run", in that they look for a particular condition to be present in the ePub and if found does the option otherwise does nothing...
Hi, kiwidude

Thank you for replying to my question and apologies for my tardy response.
I'm glad you answered in the affirmative, as it will make things go a lot quicker.
Your collection of plugins make Calibre a joy to use.
Huisie is offline   Reply With Quote
Old 01-19-2014, 02:52 PM   #551
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
I had a question about the "append extra css" option.

I tried this plugin on one of my ebooks and when I looked at the css code in the Calibre edit eBooks plugin, I noticed that I had two sets of <body> and two <p> tags in my css stylesheet.

I'm using Fanfiction Downloader and that plugin has it's own css options, it appears that the append worked at adding my Calibre conversion default settings.

What I don't know is what happens when there are two sets of tags for everything but the tags have slightly different information? Though some of the tags like the headers have the exact same information.

My goal was to reference fonts I've added to my Sony PRS-T3 and update my older ebooks by adding the font family to my body tag. I didn't want to reconvert over 4000 ebooks. I thought appending the font reference to the css would cause less problems.

What makes this somewhat confusing is that I have two types of conversions, one for novels and another for fanfiction I've downloaded using FFDL plugin.
Amalthia is offline   Reply With Quote
Old 01-19-2014, 04:40 PM   #552
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
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'd like to suggest/request three new features:

1. Limited HTML cleanup, specifically dealing with <span> bloat:

a. Remove unstyled <span> elements. Pretty self-explanatory; these add nothing to the book's formatting and can be safely removed.
b. Combine adjacent <span> tags that surround the same content. For instance, <span class="a"><span class="b">blah blah</span></span> is exactly equivalent to <span class="a b">blah blah</span>.

2. Unwrap paragraphs. Pretty basic rule (replace linefeeds inside paragraphs with single spaces), but automating it would be so nice...

3. For lack of a better word, de-Kobo-ify:

On the occasions when one must grab an ebook from the installed Kobo software's library, such as when Kobo doesn't provide a download button, that book includes a reference to a Kobo CSS and JavaScript file, as well as several Kobo-specific <span> elements. All of those can be removed without affecting the book itself; it's just a matter of doing so. If software like [deleted] was used to make the extraction, there may also be a rights.xml file that can be similarly removed.

Also, a tweak to the "remove ADEPT" feature that removes the linefeed at the end of that meta tag would be nice, just for aesthetic reasons.

Last edited by pdurrant; 10-28-2014 at 05:09 AM. Reason: Clarification.
Rev. Bob is offline   Reply With Quote
Old 01-20-2014, 01:54 AM   #553
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by Amalthia View Post
I had a question about the "append extra css" option.

I tried this plugin on one of my ebooks and when I looked at the css code in the Calibre edit eBooks plugin, I noticed that I had two sets of <body> and two <p> tags in my css stylesheet.

I'm using Fanfiction Downloader and that plugin has it's own css options, it appears that the append worked at adding my Calibre conversion default settings.

What I don't know is what happens when there are two sets of tags for everything but the tags have slightly different information? Though some of the tags like the headers have the exact same information.

...
AFAIK - All css is processed top to bottom so the lower, newer commands will over-ride the previous.

I though I'd posted a similar query here, but I can't now find it - maybe it's in the wrong sub-forum?. anyway, my observation was that append CSS adds lines to every stylesheet in the book, and there are usually 2 if you've used calibre to convert.
appending code to both seems harmless but the new book does fail a CSS validation done via SIGIL as the page_styles.css file is flagged as having errors
cybmole is offline   Reply With Quote
Old 01-20-2014, 05:55 PM   #554
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by cybmole View Post
AFAIK - All css is processed top to bottom so the lower, newer commands will over-ride the previous.

I though I'd posted a similar query here, but I can't now find it - maybe it's in the wrong sub-forum?. anyway, my observation was that append CSS adds lines to every stylesheet in the book, and there are usually 2 if you've used calibre to convert.
appending code to both seems harmless but the new book does fail a CSS validation done via SIGIL as the page_styles.css file is flagged as having errors
I think there is a modify epub development thread, maybe you posted the question there? I looked through most of the 37 pages until I found when append css was added.

I'll have to run some tests before I use this feature.
Amalthia is offline   Reply With Quote
Old 01-24-2014, 06:17 AM   #555
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
what logic does the plugin use for creating original_epub files.

I see that if I don't already have one of those, then one appears after I apply the plug-in. I don't see any user preference for that.

I am more concerned with understanding what happens if I already have both epub & original_epub and then run the plug in:

does it overwrite the original original_epub & if so can I prevent that. I want to use original_epub as my totally original i.e. never edited or tweaked source. I don't want it to become my last-but-one tweaked version & I don't want to set up an additional folder of original-originals outside of calibre.
I've only just spotted this behaviour as my usual workflow is epub-> calibre - epub to epub convert to apply my layout preferences, then ( only if needed) a final twek epub e.g. to tidy up TOC if I edit & remove unwanted front/back material.

but today I was going original AZW3 -> epub ->tweak & I spotted the original_epub files appearing after tweaking
cybmole 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 12:36 AM.


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