|
|
#46 | |
|
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,335
Karma: 13808420
Join Date: Nov 2019
Device: none
|
Quote:
Along those lines I've had times when a book has a lot of "crud" html and it would have been nice if Sigil's Report thing would list all of the used html tags. |
|
|
|
|
|
|
#47 | |
|
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,335
Karma: 13808420
Join Date: Nov 2019
Device: none
|
Quote:
Along those lines I've had times when a book has a lot of "crud" html and it would have been nice if Sigil's Report thing would list all of the used html tags. Last edited by hobnail; 06-25-2020 at 03:50 PM. |
|
|
|
|
| Advert | |
|
|
|
|
#48 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,929
Karma: 4217884
Join Date: Nov 2009
Device: many
|
FWIW, There is no such thing as "unused" html tags. Under the html5 spec you can actually define your own tags. These can be processed using javascript as well.
|
|
|
|
|
|
#49 |
|
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,335
Karma: 13808420
Join Date: Nov 2019
Device: none
|
I was thinking along the lines of the book using things like blockquote when it clearly wasn't a quote, or h5 for bolding.
|
|
|
|
|
|
#50 |
|
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,335
Karma: 13808420
Join Date: Nov 2019
Device: none
|
|
|
|
|
| Advert | |
|
|
|
|
#51 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 64,324
Karma: 104254653
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
|
Thing is, there are a lot of eBooks that have nonexistent classes in the HTML. Some of those classes ae used in place of an ID. The others, I have no idea why they are there or why the CSS is missing those classes.
|
|
|
|
|
|
#52 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 56
Karma: 7130
Join Date: Apr 2015
Device: PRS-T3
|
Thanks to comments by @DNSB and @hobnail.
It would be good to have both an information showing the undefined/non-existing classes and an option to remove those of them that a user does not want to keep. A manual removal could be quite complicated, since I've seen constructions like class="class1 class2 ... classN", which makes it difficult to remove a specific class (even with regex) if it has a "conventional" name like "center" or the name of class2 (e.g., heading, author) is also a part of classN (e.g., subheading, co-author). An option for the generation of empty classes for the ones that are kept would be the icing on the cake. I don't know if this already exists in the plugin, but since there's a discussion about code additions. I've seen style sheets contain class definitions two or more times. Therefore, it would be good, if these definitions were merged. I further noticed that sometimes classes contain the same instruction several times but with different values, e.g., "text-align: left" followed later by "text-align: right". Since only the last definition will be applied, it would be advantageous to remove the first. |
|
|
|
|
|
#53 | |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34
Karma: 467802
Join Date: Apr 2016
Device: none
|
Hi mcdummy,
I'd rather think about providing a different plugin that could automatically remove unmatched classes in xml/xhtml than modifying this one. That's because this plugin is designed to run as safely as possible on as many epubs out there as possible, and in doing so it changes absolutely nothing outside of css files. Adding this feature would open a whole new set of issues and edge cases to be worried about. If (but that's a big if) I find the time in the next days I'll try to put something together (but if someone else wants to step up, please feel free to do so). About the other suggestions, I find them interesting, and I'll think about them a bit more, although I'm not totally convinced. These are my thoughts for now. Just showing the classes unmatched by a selector is already done by the Reports tool as DNSB pointed out. About merging rulesets, I think that's not impossible, but that's not totally safe either: Code:
.classA {}
.classB { color: red }
.classA { color: blue }
Code:
.classA { color: blue }
.classB { color: red }
Quote:
@hobnail: I'm not sure I understood your last posts: do you have a specific proposal or were you simply backing the request of mcdummy? |
|
|
|
|
|
|
#54 | |||
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 56
Karma: 7130
Join Date: Apr 2015
Device: PRS-T3
|
Quote:
Quote:
Quote:
|
|||
|
|
|
|
|
#55 | |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34
Karma: 467802
Join Date: Apr 2016
Device: none
|
Quote:
![]() Meanwhile, I uploaded version 0.3.2 of this plugin with an icon for displaying in Sigil. |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 471 | Today 05:56 PM |
| [FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 25 | 10-13-2019 12:32 AM |
| Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 03:24 AM |
| [GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 01:27 PM |
| New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 01:11 PM |