Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 07-27-2018, 09:17 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
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>
where nosuchclass in not in any style sheet or otherwise defined

[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.
phossler is offline   Reply With Quote
Old 07-27-2018, 09:40 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
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.
kovidgoyal is offline   Reply With Quote
Old 07-28-2018, 09:36 AM   #3
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
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
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	164
Size:	109.1 KB
ID:	165263  

Last edited by phossler; 07-28-2018 at 09:42 AM.
phossler is offline   Reply With Quote
Old 07-28-2018, 11:50 AM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,754
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by phossler View Post
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
I would say it indicates: 'not defined'

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]
, I can't say what your current display would say if they were defined up in the [head] of the document
theducks is offline   Reply With Quote
Old 07-28-2018, 06:31 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,532
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@phossler - try Sigil->Tools->Reports->Style Classes in HTML Files

Click image for larger version

Name:	1.jpg
Views:	241
Size:	110.3 KB
ID:	165275

BR
BetterRed is offline   Reply With Quote
Old 07-29-2018, 06:58 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
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?
kovidgoyal is offline   Reply With Quote
Old 07-29-2018, 09:29 AM   #7
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by theducks View Post
I would say it indicates: 'not defined'

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
phossler is offline   Reply With Quote
Old 07-29-2018, 09:35 AM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,754
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by BetterRed View Post
@phossler - try Sigil->Tools->Reports->Style Classes in HTML Files

Attachment 165275

BR
Uh! That is a SIGIL report, I think the Phos only uses Calibre.

(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
theducks is offline   Reply With Quote
Old 07-29-2018, 09:37 AM   #9
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by BetterRed View Post
@phossler - try Sigil->Tools->Reports->Style Classes in HTML Files

BR
Thanks for the suggestion, but I've sort of 'standardized' on Calibre


There are the 2 Calibre reports that are similar to Sigil's
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	205
Size:	77.0 KB
ID:	165280   Click image for larger version

Name:	Capture2.JPG
Views:	220
Size:	65.2 KB
ID:	165281  
phossler is offline   Reply With Quote
Old 07-29-2018, 06:34 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,532
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by phossler View Post
Thanks for the suggestion, but I've sort of 'standardized' on Calibre


There are the 2 Calibre reports that are similar to Sigil's
I use Sigll, primarily because of familiarity, and more recently because of its plugins. I use calibre editor when I need multilingual spell-checking.

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

Quote:
Originally Posted by theducks View Post
Uh! That is a SIGIL report . . .
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
BetterRed is offline   Reply With Quote
Old 07-29-2018, 09:33 PM   #11
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,754
Karma: 54401244
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
theducks 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
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


All times are GMT -4. The time now is 05:42 AM.


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