|
|
#61 |
|
Addict
![]() Posts: 318
Karma: 22
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
|
Got it. The only downside is that calibre removes these font declarations from the css and puts them in every html/xhtml file when doing a epub -> epub conversion - I don't know why calibre does this. So I usually open the css file after removing the fonts and delete the font declarations. |
|
|
|
|
|
#62 | |
|
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,420
Karma: 11289119
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7, Sony PRS-950, Sony PRS-505, PRS-300
|
Quote:
__________________
-- Good Reading, Walt -- 20GB of free CLOUD STORAGE: Use this link to sign up for a free 15GB Copy.com cloud storage account and we both get an extra 5GB of free space. |
|
|
|
|
|
Enthusiast
|
|
|
|
#63 |
|
Addict
![]() Posts: 318
Karma: 22
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
|
|
|
|
|
|
|
#64 |
|
calibre/Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,098
Karma: 1211234
Join Date: Oct 2010
Location: London, UK
Device: Kindle 3 3G, iPad 2, iPad 3
|
Modify ePub next version beta
I've moved a bunch of recent posts from this thread about other additions I may make to this plugin over on the related thread in the Development forums, but will try to keep the hopefully slightly less technical discussions on this thread.
The new features intended for this next release can be seen in the screenshot below:
This is a beta version!. Please make sure you have a backup of your ePub(s) you are modifying when you are experimenting with these new options in case I have badly screwed up. I've given them a quick whirl as a sanity check but there could be edge cases I've missed. Also note there is a new beta version of the Quality Check plugin here which has matching checks for all of the above. So please feel adventurous and install both together to more easily test them. Feedback very much welcomed before I officially release it. The other features I am considering working on can wait for a future version...
__________________
Like my calibre plugins or Sigil work? Say thanks with PayPal Last edited by kiwidude; 05-04-2012 at 07:16 PM. Reason: Removed attachment as latest version officially released |
|
|
|
|
|
#65 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34,652
Karma: 14439052
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
|
When this plugin is used, does Calibre do any modification to the ePub other then the function(s) of the plugin being used? For example, removing the page-template file and links, is the ePub the same other then these missing things?
__________________
|
|
|
|
|
|
#66 |
|
Addict
![]() Posts: 318
Karma: 22
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
|
|
|
|
|
|
|
#67 |
|
Addict
![]() Posts: 318
Karma: 22
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
|
@kiwidude: currently testing this beta and it's working great but it looks like you have to do a couple of passes to remove every checked option.
With "Remove inline @font-face declarations" checked and the three Adobe options checked, this is what I've seen: In the first pass, it removes the declarations and the xpgt file. In the second pass, it removes the Adobe DRM meta tags if found. In the third pass, it removes the link to the xpgt file. No ill effects observed. Great work ! Last edited by paulfiera; 05-04-2012 at 03:06 AM. |
|
|
|
|
|
#68 | |
|
calibre/Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,098
Karma: 1211234
Join Date: Oct 2010
Location: London, UK
Device: Kindle 3 3G, iPad 2, iPad 3
|
Quote:
So if you choose the xpgt files & links option for example, the only change that should be made is to the opf file to remove the reference to the xpgt, the xpgt file itself will be deleted, and then on each html page that had a <link .../> it will do a simple raw text regex based replacement of just that.
__________________
Like my calibre plugins or Sigil work? Say thanks with PayPal |
|
|
|
|
|
|
#69 |
|
calibre/Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,098
Karma: 1211234
Join Date: Oct 2010
Location: London, UK
Device: Kindle 3 3G, iPad 2, iPad 3
|
@paulfiera - three passes should not be necessary (that is what it does internally in the code, but you should only have to click the ok button once). I must admit I only tested the options individually as I wrote them, I'll take a look at this shortly.
__________________
Like my calibre plugins or Sigil work? Say thanks with PayPal |
|
|
|
|
|
#70 |
|
Addict
![]() Posts: 318
Karma: 22
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
|
Thanks, kiwidude.
This seems to happen when the three conditions are met:
I've tested it by running the plugin and opening the epub in Sigil. And it looks like the removal of these elements always happens in the same sequence. |
|
|
|
|
|
#71 |
|
calibre/Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,098
Karma: 1211234
Join Date: Oct 2010
Location: London, UK
Device: Kindle 3 3G, iPad 2, iPad 3
|
Ok, cool. It does bring up another question I meant to ask - do the removal of @font-face declarations have to be so granular? At the moment removing embedded fonts, css @font-face and html @font-face delcarations are three separate options.
I would anticipate most users being happy to just tick "Remove embedded fonts" and have it also remove *any* font-face declarations. Are there any scenarios at all where this would not be the case?
__________________
Like my calibre plugins or Sigil work? Say thanks with PayPal |
|
|
|
|
|
#72 | |
|
Addict
![]() Posts: 318
Karma: 22
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
|
Quote:
My vote for the "Remove embedded fonts" checkbox taking care of everything. Fonts and declarations. |
|
|
|
|
|
|
#73 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,134
Karma: 3391252
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, KoboGlo, KoboAuraHD
|
My 2p's worth... epubs with embedded fonts should also have @font-faces (in either css or html). Other epubs will have @font-faces (in either css or html), but no embedded font files, i.e. referencing external font files. I would be happy to have a single 'Remove embedded fonts' option which handles both scenarios. I don't need to know which scenario was found, I just want it all gone.
|
|
|
|
|
|
#74 |
|
calibre/Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,098
Karma: 1211234
Join Date: Oct 2010
Location: London, UK
Device: Kindle 3 3G, iPad 2, iPad 3
|
Thanks folks, I have rolled them all together for the next version I will post shortly. Paul I found the bug in the "individual step" stuff you were having to do so that will be sorted too.
It does beg the question as to whether Quality Check needs two checks then - should it just have a single "Check @font-face" which looks at both css and html files? The log can display where it found them...
__________________
Like my calibre plugins or Sigil work? Say thanks with PayPal |
|
|
|
|
|
#75 |
|
Addict
![]() Posts: 318
Karma: 22
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Modify ePub plugin dev thread | kiwidude | Development | 344 | 06-12-2013 11:45 PM |
| [GUI Plugin] Quality Check | kiwidude | Plugins | 632 | 06-02-2013 04:40 PM |
| [GUI Plugin] Manage Series | kiwidude | Plugins | 105 | 05-06-2013 01:43 PM |
| [GUI Plugin] Open With | kiwidude | Plugins | 183 | 04-22-2013 02:25 PM |
| [GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |