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 02-28-2012, 07: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: 654
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300, PW2
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, 10: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
Old 02-28-2012, 04: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: 654
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300, PW2
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, 09: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 10:25 PM.
richreads is offline   Reply With Quote
Old 03-21-2012, 10:09 PM   #50
theducks
Grand Sorcerer
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: 14,633
Karma: 5628865
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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
Old 03-21-2012, 10: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, 12: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: 8,838
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
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, 01: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,101
Karma: 8671315
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
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, 09: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, 05:29 AM   #55
ShellShock
Guru
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: 878
Karma: 1639368
Join Date: Sep 2008
Device: Sony PRS-505 & PRS-650, Kobo Glo & Aura HD
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, 05:34 AM   #56
ShellShock
Guru
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: 878
Karma: 1639368
Join Date: Sep 2008
Device: Sony PRS-505 & PRS-650, Kobo Glo & Aura HD
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, 05:50 AM   #57
ShellShock
Guru
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: 878
Karma: 1639368
Join Date: Sep 2008
Device: Sony PRS-505 & PRS-650, Kobo Glo & Aura HD
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, 07:40 AM   #58
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,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@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, 07: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: 339
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
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, 08:52 AM   #60
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,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@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

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 780 09-12-2014 10:04 PM
[GUI Plugin] Manage Series kiwidude Plugins 113 08-01-2014 08:18 PM
[GUI Plugin] Open With kiwidude Plugins 228 07-31-2014 01:06 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:36 AM.


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