07-27-2018, 09:17 PM | #1 |
Wizard
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Is there way to list undefined classes?
In the HTML I have something like
Code:
<p class="nosuchclass"> text …. text<p> [Reports, Style Classes] will list it, and [Tools, Remove Unused CSS Rules] will delete it from the HTML ('See What Changed' shows it), BUT is there any way to just show or mark a class in the HTML that is not defined in a CSS or {Style}? I often clean up (at least that's what I call it) an epub to simplify overly defined classes that are 99% identical and make no difference on my reader. |
07-27-2018, 09:40 PM | #2 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Not sure what you mean by "show or mark". Take hte list from the reports tool and search for them, then you can go to them one by one.
|
Advert | |
|
07-28-2018, 09:36 AM | #3 |
Wizard
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Maybe I'm not understanding the way to read the report?
If the count = [0], does that mean it's not explicitly defined? I always took the [count] to be the number of places it was used in the epub so if I did have a count of [0], I thought I had defined a class in a style sheet but did not use the class Since 'nosuchclass' was actually used one place in the book, I'd have expected [1] and not [0]. I was looking to find somewhere that 'nosuchclass' was used (one time) but not defined. [Tools, Remove Unused] will delete it, but I wanted to at least look first Last edited by phossler; 07-28-2018 at 09:42 AM. |
07-28-2018, 11:50 AM | #4 | |
Well trained by Cats
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
There are 2 CSS 'views' (the left pane) on classes The one you are looking at is the callout FOR a class CSS rules, is the USAGE of that rule (class) Since I don't (deliberately) use Code:
[style] ... [/style] |
|
07-28-2018, 06:31 PM | #5 |
null operator (he/him)
Posts: 20,552
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
Advert | |
|
07-29-2018, 06:58 AM | #6 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's an odd report, can you attach the file in which it occurs?
|
07-29-2018, 09:29 AM | #7 |
Wizard
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Possibly, but to me it seems usage is inconsistent with the rest of the report: [5] means the class "center" was used 5 times, but [0] means "Used, but Not Defined"?? I would expect that for the sample file it would be [1] since the class "nosuchclass" was actually used one time |
07-29-2018, 09:35 AM | #8 | |
Well trained by Cats
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
(I use both editors, so I try and remember which forum I am answering with instructions (I won't tell you how many replies I have binned, after discovering I an using the wrong program for the example ). An 'undefined' rule just defaults the tags (inherited) 'default' for the viewer |
|
07-29-2018, 09:37 AM | #9 | |
Wizard
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Quote:
There are the 2 Calibre reports that are similar to Sigil's |
|
07-29-2018, 06:34 PM | #10 | |
null operator (he/him)
Posts: 20,552
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
But I regularly use Reports from both, e.g. calibre editor's Words and Sigil's Links, and I just as regularly wish both editors had the same Reports as the other one I knew that, that's why I wrote: "try Sigil->Tools->Re..." The Sigil report will give the OP what he wants, he can save it to a CSV and action it in calibre-editor if he's concerned about editing the book in Sigil. BR |
|
07-29-2018, 09:33 PM | #11 |
Well trained by Cats
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
BR I use Sigil and Calibre almost exactly for the same reasons you give. Familiarity
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre - Search Publication Date undefined | Laval | Calibre | 1 | 06-28-2018 08:33 AM |
Pseudo classes with classes | Macsurfcat | ePub | 4 | 01-07-2016 04:00 AM |
W3C Validation says: Elements are undefined | verydeepwater | ePub | 7 | 01-11-2013 05:09 AM |
(Development) What are these apparently-undefined python operators? | offby1 | Calibre | 5 | 06-26-2010 11:57 AM |
PRS-600 Sony library - Error undefined | omk3 | Sony Reader | 13 | 01-22-2010 10:52 AM |