08-17-2019, 04:12 AM | #931 |
Wizard
Posts: 1,095
Karma: 1954136
Join Date: Aug 2015
Device: Kindle
|
One of the good predictors of epub quality is the size of the css file. epubs with css less than 1 Kb usually turn out to be of bad quality. I checked my library that way outside calibre by extracting the size of the css for each epub. My coding skills are not really up to the task of adding such functionality to this plugin. Is someone is still maintaining the plugin he might consider adding this.
|
08-17-2019, 08:56 AM | #932 | |
Well trained by Cats
Posts: 29,820
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:
IMHO that is a possible sign of bloat Here is my basic stylesheet (modeled after Webcriptions of old), 609 bytes and it includes some stuff some would have kittens over. Code:
body{ display: block; font-size: 1.2em; margin-bottom: 0; margin-left: 2pt; margin-right: 2pt; margin-top: 0; padding-left: 0; padding-right: 0; text-align: justify } .indented{ display: block; margin: 0.5em 0 0 0; text-indent: 1.5em; } .nonindented{ display: block; margin: 0.5em 0 0 0; text-indent: 0; } .chapno { display: block; font-size: 1.5em; margin: 1em 0; border: 0; padding: 0; text-indent: 0; text-align: center; } .scene { display: block; margin: 1em 0; text-align: center; } |
|
Advert | |
|
08-17-2019, 03:38 PM | #933 |
Bibliophagist
Posts: 35,513
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I just checked my collection and found ~120 book that had a CSS file under 1KB. Removing those that had multiple CSS files, of the ~50 remaining, several did look as if the CSS had been trimmed to remove unused styles but overall, none of them looked bad. Perhaps a bit simple layout but eminently readable.
|
08-17-2019, 04:32 PM | #934 |
Resident Curmudgeon
Posts: 74,049
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
One thing I really dislike is the margin shortcut. It doesn't need to exist. Just use the full margin commands as it's easier to read.
What I do is load the eBook into Calibre. I then delete every useless HTML file and if there are multiple CSS, I delete the ones I no longer need and merge the rest. I also have Calibre remove unused CSS in the CSS file and HTML. Then I add in my own body and p classes. Then I make any other changes needed. The problem is that if I drop in my own full CSS, I end up having to figure out what from the publisher CSS goes with my CSS and what I cannot dump as I don't have a version. It's too much hassle. it's a lot easier to modify what's there. |
09-15-2019, 09:52 AM | #935 |
Well trained by Cats
Posts: 29,820
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Request: for Check (triggered by a user question in Library Management)
Check (structure?) for EPUB Type: 2 OR 3 <selection |
Advert | |
|
09-18-2019, 06:04 PM | #936 |
Guru
Posts: 769
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
|
Is there any possibility of adding a check for invalid CSS properties to this wonderful plugin? It does everything else I need, so a check for invalid CSS properties would make my life complete. Thank you for this very useful tool.
Last edited by icallaci; 09-18-2019 at 07:44 PM. |
12-23-2019, 12:37 PM | #937 |
Junior Member
Posts: 8
Karma: 10
Join Date: Aug 2019
Location: New Jersey
Device: Kindle Oasis 2
|
[Enhancement] Bad Breaks Search
Sadly I am not a engineer, but if anyone finds the challenge interesting I'm happy to help with testing, etc. Thanks everyone for making this such a great application and plugin.
USER STATEMENT As a Calibre user, I would like to be able to detect books with "Bad Breaks" so that I can repair or replace them with more readable versions. BACKGROUND As a result of poor conversion there are often books that have "Bad Breaks", where a line break is inserted mid sentence. This results in a new line that typically begins with a lowercase letter. This is very common and likely one of the biggest quality and readability issues with many Calibre user libraries. Unfortunately, there is no easy way to search an entire library and identify books that have Bad Breaks. ACCEPTANCE CRITERIA * User is able to search an entire library for books that have bad breaks * User can search mobi, epub and azw formats * User is able to set a threshold for number of bad breaks identified * Results are displayed in filtered view EXTRA CREDIT * User is able to sample book and set page size or word count for sample size * User can search additional document formats |
12-23-2019, 06:31 PM | #938 | |
Wannabe Connoisseur
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Quote:
I'm sure there's someone in the Sigil world who has built up a fancy regex to find many of these. (Quick search...) There are some examples here, here, here and here. Definitely a handy one if it could be implemented. |
|
12-23-2019, 09:18 PM | #939 | |
Well trained by Cats
Posts: 29,820
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 still EXCEPTIONS . (lots of Publishers Boilerplate should not be touched). I am currently reading a book that has a acronym that starts with a lower case letter. A.M. or P.M. will fail. (One of my searches dos fix Mr. Mrs. ... splits ) Still, Nothing beats the human eyeball for spotting errors |
|
12-24-2019, 12:09 AM | #940 | ||
Junior Member
Posts: 8
Karma: 10
Join Date: Aug 2019
Location: New Jersey
Device: Kindle Oasis 2
|
Quote:
Judging from the conversation, fixing the problem would take some finesse, and likely some human judgement. I'm a little nervous to even take that on, hah.. But clearly you all have been thinking about some improved approaches over the "Line un-wrap factor" that exists in Calibre. From an identification perspective it sounds like we have two challenges; 1) accurately identifying the Bad Breaks via regex, and 2) implementing a regex search across an entire library. Strictly from an identification vantage, do you think the regex posted here would do a decent job of identifying the breaks for the purpose of a quality check? Would it ignore the title edge case? Are there other edge cases that you would consider for the purposes of quality check and finding books with this problem? Quote:
This is really interesting, thanks so much for the direction on this! |
||
12-24-2019, 12:56 AM | #941 | ||
Wannabe Connoisseur
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Quote:
Code:
[\w",](</span>)?</p> Quote:
Spoiler:
Instead of just looking for at least one match for the regex, you could count the number of times the broken sentence regex appears and return "true" if more than certain (configurable?) threshold. It seems like your original goal of detecting all epubs in a library that have possible broken sentences doesn't seem that hard (he says!). Fixing those automatically? No thanks I'm still very new to Calibre plugins, so I may be leading you down the wrong path. So take all that I said about with a grain of salt, especially if someone more knowledgeable says something that contradicts me |
||
12-24-2019, 02:40 AM | #942 |
Wannabe Connoisseur
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Indeed, Stephen King's Christine has 145 matches for just [a-z]</p> and 245 matches for [a-z,]</p>. Almost all of these were in song verses at the start of each chapter, but there were three missing periods at the end of sentences, one comma that should have been a period and one actual occurance of a break mid-sentence.
|
12-24-2019, 03:42 AM | #943 |
Resident Curmudgeon
Posts: 74,049
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Is anyone working on making this plugin work with Python 3?
|
12-24-2019, 07:55 AM | #944 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
|
12-24-2019, 08:32 AM | #945 |
Resident Curmudgeon
Posts: 74,049
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Clipboard Search | kiwidude | Plugins | 29 | 04-02-2024 10:05 PM |
[GUI Plugin] Search the Internet | kiwidude | Plugins | 433 | 04-01-2024 05:48 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 AM |
[GUI Plugin] Kindle Collections (old) | meme | Plugins | 2070 | 08-11-2014 12:02 AM |
[GUI Plugin] Book Sync **Deprecated** | kiwidude | Plugins | 111 | 06-07-2011 07:47 PM |