![]() |
#166 |
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Delete Unused Stylesheet Styles
Delete Unused Stylesheet Styles is a great addition that cleans-up the code.
If possible, it would be nice if this could be turned on/off in Preferences. I would leave it ON. ![]() |
![]() |
![]() |
#167 |
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Its not a checkbox/option - its a function/action that gets run, like Validate. The same with Delete Unused Images. So you get to choose to use it or not
![]() |
![]() |
Advert | |
|
![]() |
#168 |
Berti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Regex
Regex seams not to work properly. It seams that the "Dotall" option is always turned on (I'm sure that it is not checked")
|
![]() |
![]() |
#169 |
Techno-geek
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 225
Karma: 1116651
Join Date: Nov 2006
Location: Mississippi, USA
Device: PRS-T1 (Black), PRS-T3S (Black), Kobo Aura ONE
|
Could someone explain the dotall option? Does it have to do with greedy matching? Or what?
--MH |
![]() |
![]() |
#170 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,654
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@mmat1 - oops - that would be because the settings are the wrong way around in the code. Will be fixed for the next build. I always leave both turned on so never noticed. Thanks for reporting this.
|
![]() |
Advert | |
|
![]() |
#171 | |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,654
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
Basically it comes down to if in an expression you do .* it matches just a single line or not. Say you want to get rid of whole script blocks, you can do <script>.*</script> with DotAll turned on, but that won't work with it turned off because the closing </script> is on a different line in the file. |
|
![]() |
![]() |
#172 |
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
|
![]() |
![]() |
#173 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,654
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@crutledge - it can only run at a point in time - just like validating with FlightCrew for instance. It is the same sort of feature. Otherwise you wouldn't be able to declare a new style and then switch to an html file to use it, it would be gone already
![]() |
![]() |
![]() |
#174 |
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
I don't think I quite understand how this would work, or help.
Delete Unused Stylesheet Classes (renamed for the next beta to be clear its only classes - although technically they are selectors) checks your HTML and stylesheets then deletes the stylesheet entries that weren't matched by a class used in the HTML. Delete Unused Image Files does something similar - removes any image file that was not included in your HTML with an img tag. These are actions you run on demand. If they were on or off in a preferences setting, then as soon as you added an image or typed a class it would be deleted before you could use it. ![]() |
![]() |
![]() |
#175 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,994
Karma: 56143932
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
These are not Toggled options.
They are click to run. No clickey, no runney which is a good thing. I might have a default stylesheet, that I have not finished editing the book sections, some of which may use some of those styles (later) Sigil crew: GREAT feature ![]() |
![]() |
![]() |
#176 |
Jr. - Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
|
|
![]() |
![]() |
#177 |
Berti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Reformat CSS
Reformat (to single line per style) eats my characters
![]() span.fakesmallcaps {font-size: .75em} becomes: span.fakesmallcaps { font-size: .75e; } This happens probably only with lines which are already a single line style definition plus it does not happen always. In my example I had 4 single line definitions at the end of the file (showing one of them above) and the very last 3 were faulty afterwards. |
![]() |
![]() |
#178 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,654
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@mmat1 - thanks, that is an interesting one, it does seem the wind needs to blow in a particular direction for it to fail. It will get sorted for the next build.
|
![]() |
![]() |
#179 | |
Berti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
|
|
![]() |
![]() |
#180 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,654
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@mmat1 - thanks but I figured out the cause and the fix. It was a simple "one-off" error after the code was changed to handle three different purposes. Did the two new ones well, the original purpose not so much any more...
|
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Beta for BB? | FF2 | Amazon Kindle | 2 | 05-28-2011 10:21 AM |
Ίχνη Φαντασμάτων Μία υπόθεση του Μαξ Κίλλιαν - 99 cents! | BearMountainBooks | Self-Promotions by Authors and Publishers | 5 | 08-24-2010 07:00 PM |
Beta Beta Test of Major New Features | Starson17 | Calibre | 45 | 05-17-2010 10:55 AM |
0.6 out of beta? | Nate the great | Calibre | 3 | 07-17-2009 02:45 AM |