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 01-24-2014, 07:33 AM   #556
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 6,092
Karma: 6238033
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
Whether the ORIGINAL_EPUB is created is based on the tweak "save_original_format_when_polishing". If that is True, the current epub is copied to ORIGINAL_EPUB before making the changes.
davidfor is online now   Reply With Quote
Old 01-24-2014, 07:54 AM   #557
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,002
Karma: 1285294
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
Quote:
Originally Posted by davidfor View Post
Whether the ORIGINAL_EPUB is created is based on the tweak "save_original_format_when_polishing". If that is True, the current epub is copied to ORIGINAL_EPUB before making the changes.
OK - so in the last few months I have probably destroyed a whole bunch of original-origiinal_epub backups without realising I was doing that

when was this "feature" released - maybe the damage is not as bad as I fear, if it was only recently introduced. I skimmed back through the thread & it's only 2 pages back
cybmole is offline   Reply With Quote
 
Advertisement
Old 01-24-2014, 08:32 AM   #558
Rev. Bob
Guru
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: 940
Karma: 4214170
Join Date: Feb 2013
Device: Kobo Glo, Kindle Touch
Quote:
Originally Posted by cybmole View Post
when was this "feature" released - maybe the damage is not as bad as I fear, if it was only recently introduced. I skimmed back through the thread & it's only 2 pages back
About five months ago, at the end of August.
Rev. Bob is offline   Reply With Quote
Old 01-24-2014, 08:41 AM   #559
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,909
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by cybmole View Post
OK - so in the last few months I have probably destroyed a whole bunch of original-origiinal_epub backups without realising I was doing that
I don't believe any original_epub is ever overwritten. It'll take only a few minutes to prove it to yourself, so check. The original_epub is only created if one doesn't exist.

Last edited by DoctorOhh; 01-24-2014 at 08:46 AM.
DoctorOhh is offline   Reply With Quote
Old 01-24-2014, 03:02 PM   #560
eschwartz
Irrational Optimist
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: 8,449
Karma: 15640443
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
If it follows the core calibre logic (when converting and polishing) I believe the "original_epub" is used as the source for all changes, if available. So if it doesn't exist, calibre changes "epub" and backs up the original as "original_epub", but if it DOES exist, calibre uses THAT as the source for the conversion/polish, and overwrites the "epub".

Under no circumstances is "original_epub" ever supposed to get overwritten.
eschwartz is offline   Reply With Quote
Old 01-25-2014, 12:05 AM   #561
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 6,092
Karma: 6238033
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
Looking at the code again, and actually reading it, the ORIGINAL_EPUB is only created if it doesn't exist. But, I am pretty sure it is working on the current epub for the changes. The only reference to the ORIGINAL_EPUB I can find is when it is created and that is after the confirmation prompt. I just did a quick test and it is modifying the current epub, not the original.
davidfor is online now   Reply With Quote
Old 01-25-2014, 08:23 PM   #562
Amalthia
Guru
Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.Amalthia once ate a cherry pie in a record 7 seconds.
 
Amalthia's Avatar
 
Posts: 951
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650
Is there a way to use this plugin to completely batch replace a stylesheet in an ebook, instead of append?

I have thousands of stories and I didn't fancy updating the stylesheet.css one at a time.
Amalthia is offline   Reply With Quote
Old 01-25-2014, 09:59 PM   #563
eschwartz
Irrational Optimist
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: 8,449
Karma: 15640443
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by davidfor View Post
Looking at the code again, and actually reading it, the ORIGINAL_EPUB is only created if it doesn't exist. But, I am pretty sure it is working on the current epub for the changes. The only reference to the ORIGINAL_EPUB I can find is when it is created and that is after the confirmation prompt. I just did a quick test and it is modifying the current epub, not the original.
Well, it's possible that is what calibre itself does, but to be honest, it was a little confusing to me. All I could really determine was that original_epub should get created as a backup of the original state of the book, no matter what else. Unless you disable it via preferences.
eschwartz is offline   Reply With Quote
Old 02-12-2014, 07:47 AM   #564
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,002
Karma: 1285294
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
Question

Quote:
Originally Posted by eschwartz View Post
Well, it's possible that is what calibre itself does, but to be honest, it was a little confusing to me. All I could really determine was that original_epub should get created as a backup of the original state of the book, no matter what else. Unless you disable it via preferences.
back to this issue.
I'd followed advice given and turned OFF the create/ override of original_epub when tweksing . polishing
I'd tested & it was working

as at v 1.23 it has been turned back ON in my preferences & I did not do it.

i.e. I had set
save_original_format_when_polishing = False
it had silently changed back to
save_original_format_when_polishing = True

so who / when / how ?

AM I going to have to check & re-test after every calibre update ?


or Iha I somehow not made that change STICK ?

Hmm- I change trus to false, like so
# Save original file when converting/polishing from same format to same format

save_original_format = True

save_original_format_when_polishing = False

I click apply at bottom of window, then I click apply at top left, and I get this:
calibre, version 1.23.0
ERROR: Invalid tweaks: The tweaks you entered are invalid, try resetting the tweaks to default and changing them one by one until you find the invalid setting.

Traceback (most recent call last):
File "site-packages\calibre\gui2\preferences\tweaks.py", line 421, in commit
File "<string>", line 623
Qt = <class 'PyQt4.QtCore.Qt'>
^
SyntaxError: invalid syntax

it seems that those 2 tweak value cannot be edited at all. restore defaults works, overwriting True with True , for either field gives the above error ??? so it's not really a syntax error, I am not changing anything???

Last edited by cybmole; 02-12-2014 at 08:02 AM.
cybmole is offline   Reply With Quote
Old 02-12-2014, 07:55 AM   #565
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,002
Karma: 1285294
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
repeating the is - original_epub overwritten test.
I am using this preference
save_original_format_when_polishing = True
I have chosen a book in my library for which the epub & the original epub file dates are both 10/1/13
I am now runniing modify epub....
epub file date changes to today
original epub date not changed - so I was wrong about that, and my original originals are all still intact, I think!

Last edited by cybmole; 02-12-2014 at 08:04 AM.
cybmole is offline   Reply With Quote
Old 02-16-2014, 06:59 AM   #566
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,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@cybmole - this plugin will *never* overwrite an existing "ORIGINAL_EPUB".

The logic in this plugin is very simple when that "save_original_format_when_polishing" is set to true:

- If you have an EPUB but no ORIGINAL_EPUB, then it will effectively copy the current EPUB to "ORIGINAL_EPUB", *before* doing any Modify operations on the EPUB.
- If have an ORIGINAL_EPUB but no EPUB, then it will do nothing.
- If you have an EPUB and already an ORIGINAL_EPUB, then it just works on the EPUB.

So operations are always and only ever on the EPUB format. If you do multiple Modify operations, they will progressively get applied to that EPUB version. The plugin never takes the ORIGINAL_EPUB as a starting point for operations. If you want to do that you have to use the conventional "Restore" feature that calibre has to overwrite your EPUB from the ORIGINAL, and then do your Modify actions again which will apply to your EPUB format.
kiwidude is offline   Reply With Quote
Old 02-16-2014, 07:21 AM   #567
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,002
Karma: 1285294
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
that is comforting, thanks & I've proved it with my own tests also, Somehow, earlier in the thread I got the idea that is was overwriting - maybe someone else posted to say that's what it did & I assumed they were correct.
cybmole is offline   Reply With Quote
Old 02-19-2014, 04:20 PM   #568
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,002
Karma: 1285294
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
new reader - new challenge.
to get the most out of my new Kobo aura HD reader, it seems I need to retrospectively strip all
font-family: xxxxxxxxxxx;
lines from my books CSS.
I've been merrily doing the opposite of that, and adding an explicit
p { font-family: "Times New Roman", Times, serif;}
via append css for some time now
So has a "remove CSS" type feature ever been requested, either within the plug in or within the main calibre convert settings
I suppose I can construct a find + replace regex but I'd prefer not to have to reconvert books if there is an easier way
I think I'd need to find font-family(.*);
replace with nothing
and hope that there are no instances that don't have a trailing ;
or can I append a "null" setting that will act as an overwrite. is there such a command as font-family:[empty]; ?
UPDATE:
I see that I can set a filter within calibre convert options that will remove font family, but an initial test shows that that filer setting is not picked up and applied by the plug-in. The plug-in only picks up extra css to append, not filters to apply ?

Last edited by cybmole; 02-19-2014 at 04:31 PM.
cybmole is offline   Reply With Quote
Old 02-20-2014, 07:05 AM   #569
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 1,688
Karma: 3288140
Join Date: Nov 2012
Location: New Zealand
Device: Kobo Glo
Quote:
Originally Posted by cybmole View Post
or can I append a "null" setting that will act as an overwrite. is there such a command as font-family:[empty]; ?
You could append p {font-family: inherit} which should override the previous font-family setting and do the same thing as if there had been no font-family property defined at all.
GeoffR is offline   Reply With Quote
Old 03-29-2014, 10:36 AM   #570
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
I have an idea for an added extra feature...

Seeing as quite a few e-readers now allow a user to load their own fonts onto a device, would it be possible to have an added css feature, when stripping embedded fonts to allow instead of stripping the references to those fonts have the src point to a device resource font instead.
- could possibly have a list of fonts which would be redirected
- would have to probably have a text box with a 'device font path', which would be up to user to make sure that it is correct.

The main reason I ask, is that I have a lot of epubs with several common fonts (Charis being main one) and would like to reduce the size footprint of the epubs, but not have to miss the correct fonts being used.

What do you think?
Perkin 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 797 12-16-2014 01:01 PM
[GUI Plugin] Open With kiwidude Plugins 251 12-15-2014 01:07 PM
[GUI Plugin] Manage Series kiwidude Plugins 113 08-01-2014 09:18 PM
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:50 PM.


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