View Single Post
Old 06-07-2012, 05:47 AM   #18
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
@Ahmad Samir

Thanks for providing a very nice code.

Your first command, the list of used styles in the text, represents a good part of the answer. Would it be possible to add, for each of the listed styles, the occurrences of each of them?

I mean, to get a list of this kind: |Italdroite 25|Header 12| and so on...
We could focus later on the least used items.

Spoiler:

Code:
roger@lmde64 ~/Bureau/Coups/OEBPS/Text $ pcregrep -o -h 'class=".+?"' * | sort -u | perl -p -e 's/class="//' | perl -p -e 's/("\n| )/|/' | perl -p -e 's/\|$//g'
Centrage|Chanson|frameFrame|Header|Heading|Italdroite|let|let1|let2|smcpCentrage|smcpChanson|smcpDroite|smcpIncise|smcpTypeA|smcpTypeV|Standard|Subtitleroger@lmde64 ~/Bureau/Coups/OEBPS/Text $

I did not find the second one so useful: it somewhat replicates the style sheet and is a little too verbose, or, more probably, I missed something...

Last edited by roger64; 06-07-2012 at 05:50 AM.
roger64 is offline   Reply With Quote