Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-28-2012, 08:43 AM   #46
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Quote:
Originally Posted by kiwidude View Post
Technically it isn't a problem to add such a feature. The question I would have is about at what level to generalise it. For instance you have said a <meta name="Adept.resource"...> tag is what you want removing. Is that going to be the one and only meta tag that would ever need removing from epubs? And should this be a new option, or just included with the "remove non dc: metadata" feature (since that is also about preparing an ePub for submission).
This would be a useful additional option but maybe it should be implemented as a sub-option of "remove non dc" with a Yes/No to manualy switch on this extra processing when required. Processing every xhtml document in the ePub will be much slower than just processing the OPF, and many books don't have this Adept data.
Agama is offline   Reply With Quote
Old 02-28-2012, 11:52 AM   #47
calvin
DRM remover
calvin began at the beginning.
 
calvin's Avatar
 
Posts: 84
Karma: 10
Join Date: Dec 2009
Location: North of Germany
Device: Kindle 3, 4 & Touch, iPhone/iPad, Hanvon N516 (OpenInkpot)
that is a very good idea!
calvin is offline   Reply With Quote
Advert
Old 02-28-2012, 05:35 PM   #48
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Quote:
Originally Posted by kiwidude View Post
Is that going to be the one and only meta tag that would ever need removing from epubs?
In at least one of my ePubs the tag takes the form:

<meta content="urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" name="Adept.expected.resource"/>

which suggests that there are variants in the value of the name attribute, and that the content attribute may come before or after the name attribute.

There is also another tag which could be removed from the xhtml files at the same time, but it is not metadata. It takes the form:

<link href="../page-template.xpgt" rel="stylesheet" type="application/vnd.adobe-page-template+xml"/>

The href part will of course vary with different ePubs.
(The corresponding page-template.xpgt could also be deleted).
Agama is offline   Reply With Quote
Old 03-21-2012, 10:40 PM   #49
richreads
Connoisseur
richreads began at the beginning.
 
richreads's Avatar
 
Posts: 53
Karma: 10
Join Date: Mar 2009
Location: Hamilton, ON
Device: Kobo Touch and Glo,
Adding Cover

Hi.
Just trying out the Modify ePub plugin and have a question.
I've downloaded a couple of public domain books and they do not have covers.
If I add a cover in calibre and metadata and them run the Modify ePub plugin it does up add the metadata jacket but it does not add a cover page.

Running a couple of tests and checking with Sigil it seems that if the cover page is there as titlepage.xhtml then the cover is updated when you use Modify ePub.

Is there any way to get the plugin to add the cover page (titlepage.xhtml) if it does not already exist?


Last edited by richreads; 03-21-2012 at 11:25 PM.
richreads is offline   Reply With Quote
Old 03-21-2012, 11:09 PM   #50
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: 30,454
Karma: 58055868
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 richreads View Post
Hi.
Just trying out the Modify ePub plugin and have a question.
I've downloaded a couple of public domain books and they do not have covers.
If I add a cover in calibre and metadata and them run the Modify ePub plugin it does up add the metadata jacket but it does not add a cover page.

Running a couple of tests and checking with Sigil it seems that if the cover page is there as titlepage.xhtml then the cover is updated when you use Modify ePub.

Is there any way to get the plugin to add the cover page (titlepage.xhtml) if it dope snot already exist?

Calibre generates A 'Jacket' that contains 'A' Cover and Metadata. Think of that as the dust cover on HB books. The Titlepage IS NOT the cover, but a page inside that displays the title (and sometimes artsy stuff).
theducks is offline   Reply With Quote
Advert
Old 03-21-2012, 11:25 PM   #51
richreads
Connoisseur
richreads began at the beginning.
 
richreads's Avatar
 
Posts: 53
Karma: 10
Join Date: Mar 2009
Location: Hamilton, ON
Device: Kobo Touch and Glo,
Quote:
Originally Posted by theducks View Post
Calibre generates A 'Jacket' that contains 'A' Cover and Metadata. Think of that as the dust cover on HB books. The Titlepage IS NOT the cover, but a page inside that displays the title (and sometimes artsy stuff).
Ok - but when using this plugin if I check 'Update metadata (including cover
)' option and a the epub has titlepage.xhtml in it then the image (or cover) in the epub is updated. If titlepage.xhtml does not exist then the image is not updated.
Am i missing a option to add/replace the image ?
richreads is offline   Reply With Quote
Old 03-22-2012, 01:27 AM   #52
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,867
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by richreads View Post
Ok - but when using this plugin if I check 'Update metadata (including cover)' option and a the epub has titlepage.xhtml in it then the image (or cover) in the epub is updated. If titlepage.xhtml does not exist then the image is not updated. Am i missing a option to add/replace the image ?
I believe you explained it correctly, in these cases you need to do a conversion to embed the image or insert the image using a program like Sigil. An ePub to ePub conversion would work.
DoctorOhh is offline   Reply With Quote
Old 03-22-2012, 02:15 AM   #53
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,765
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
The easiest way I have found to add covers that modify plugin cannot is by using epub fixer. Its very easy to set a cover with it and also remove margins without doing a conversion. Just add it to open with plugin with a keyboard shortcut I use ctrl+e
Dopedangel is online now   Reply With Quote
Old 03-22-2012, 10:16 PM   #54
richreads
Connoisseur
richreads began at the beginning.
 
richreads's Avatar
 
Posts: 53
Karma: 10
Join Date: Mar 2009
Location: Hamilton, ON
Device: Kobo Touch and Glo,
@dwanthny - thats what i have been doing - I was just hoping to use the plugin

@Dopedangel - I'll look for epubfixer and give it a try. Thanx for the suggestion.
richreads is offline   Reply With Quote
Old 04-09-2012, 06:29 AM   #55
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,177
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
How do I run this plug-in?

I have just installed v1.0.2 via Calibre "Get new plug-ins". I also installed Quality Check v1.7.2 at the same time. Quality Check appears on the main Calibre tool bar, but Modify ePub does not. Is this correct, because I can't see how I am meant to run it? Also, if I go into Preferences - Plug-ins, select Modify ePub, and Customise plug-in, it says: "Modify ePub does not need customisation". If I choose Enable/Disable plug-in, I get "Modify ePub cannot be disabled".

Thanks in advance.
ShellShock is offline   Reply With Quote
Old 04-09-2012, 06:34 AM   #56
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,177
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
OK I have fixed this by uninstalling and re-installing Modify ePub. I guess something went wrong when I installed it at the same time as Quality Check. I notice this time it defaulted to both "Add to main toolbar" and "Add to main toolbar when a device is connected". The first time it defaulted to "Add to main toolbar" only, which is what I used. (Wording of options may be slighly wrong).
ShellShock is offline   Reply With Quote
Old 04-09-2012, 06:50 AM   #57
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,177
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
I have some suggestions for new features:

"Normalise" em-dash. Changes "--" to "—" and " — " to "—", and "–" (not hyphen) to "—". This converts none standard em-dash characters to the standard em-dash; it also removes extra space from around the em-dash (this is could be optional as it is very much personal preference).

Fix cover image pages to have a white background (some come with black/grey which looks wrong).
ShellShock is offline   Reply With Quote
Old 04-09-2012, 08:40 AM   #58
kiwidude
Calibre Plugins 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,688
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@ShellShock - you have to make sure you restart calibre after installing a plugin. I suspect there was a combination in there with your multiple installs where either you missed that step - perhaps installing two new plugins for the first time without rebooting between it creates an issue. Kovid has "dabbled" with that code in a recent calibre release to ensure that by default it tries to put the plugin on the toolbar for both when a device is connected and when it is not. You will want them on both toolbars ordinarily, or else you will be joining the queue of people posting why their icons have disappeared...

As to your suggestions. Normalising of dashes from -- to — will happen automatically if you use the "Smarten punctuation" option of the plugin. As to the other dashes that look almost like emdashes etc - I'll be honest and say it isn't a huge priority personally. Perhaps you could try asking Kovid to enhance the Smarten punctuation logic to incorporate some of them if he is interested, then you would get it for free.

Not sure what you mean by fixing cover image page backgrounds? Do you have a book example? PM me a link. Not something I have ever noticed, but then I always run with the defaults of calibre stretching the image so a background isn't visible anyways. I would consider it unlikely that I would do stylesheet dabbling in this plugin but if you can send me an example I will take a look.
kiwidude is offline   Reply With Quote
Old 04-29-2012, 08:43 AM   #59
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 385
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
kiwidude, one question:

When using the option "Remove embedded fonts", could it be possible for the plugin to also remove the embedded fonts declarations in the css?
Quote:
@font-face {
font-family: "Charis";
font-style: normal;
font-weight: normal;
src: url(fonts/CharisSILR.ttf)
}
Right now, I'm doing this manually after removing the fonts with the plugin, but maybe it could be done automatically?

Many thanks.
paulfiera is offline   Reply With Quote
Old 04-29-2012, 09:52 AM   #60
kiwidude
Calibre Plugins 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,688
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@paulfiera - I don't really want to do that, as it means parsing and rewriting the css file, which is not in the "ethos" of this plugin of minimal changes.

If I remember this topic came up in the modify epub plugin development thread when I first considered the option of removing fonts. And I seem to recall that someone said leaving such orphaned declarations in the css file does absolutely no harm, and the reader will just fall back to using its default font which is what people wanted.
kiwidude is offline   Reply With Quote
Reply

Tags
modify epub


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1214 11-14-2024 12:05 PM
[GUI Plugin] Manage Series kiwidude Plugins 167 07-28-2024 04:07 PM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 09:39 AM
Modify ePub plugin dev thread kiwidude Development 346 09-02-2013 06:14 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 09:45 AM.


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