Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-21-2012, 08:26 AM   #481
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by JSWolf View Post
Well, what I think is to run whatever is selected against each book and then if any issue is found, present it to the user for that one book. Then when that is over, move on until the next book has an error. That would do in the short term until a better way can be figured out.
Unfortunately that isn't quite as simple as it sounds to me at least. How does the user "progress" to the next book? That implies there is some sort of state being kept of the search being made, with all the implications that carries of a UI for controlling it and the ability to cancel, see where you are up to etc. And you still need a way of seeing what is "wrong" with that particular book to do something with it.

And while there are times where you might work book by book, there are other users/times where doing the fix in bulk makes sense across a batch of books. After all it is easier to select a bunch of books and use modify ePub once against them with the common settings checked, than it is to book by book do various combinations.

It may be that the ultimate solution is going to have to involve another window (modeless), allowing the user to view the results in various ways such as by issue or by book etc. I've been trying to avoid doing that for various reasons but it might be the most appropriate solution here. In Find Duplicates I took the approach of using highlighting groups, but that had the advantage of the context being identical between and across groups. Another possibility would be to store the data about what is wrong with a book in the database with that book, but a user would still need to choose a menu item to actually see that info which is a bit clumsy to use. So my gut feel at the moment is that some sort of navigational window allowing the filtering of results in various ways and displaying of the associated log data for that result set is going to be the way to go. But alternative ideas welcomed...
Quote:
Sure, the ePub in question may have some file that's not UTF-8, but to the user, it looks like it's crashed. The OPF & CSS were encoded in ANSI and when I converted them to UTF-8 without BOM, the crash stopped. Another check you can add in is for proper UTF-8 without BOM encoding. Also, to not have it blow up on ANSI.
This is a handled situation where I chose to put the entire error message into the log file to help the user understand why a particular ePub could not have that check run against it. It isn't what I call a crash - that would be if the plugin stopped working. Had I just left the error message at "Unable to open ePub", then you wouldn't know why, and I couldn't tell you either without you sending it to me. I could have added some wordy message in there to that affect of telling the user not to panic, but (a) users are generally lazy and would still post about it anyway to double check what it meant, and (b) it is such a rare occurrence it hasn't been a priority.

There is however probably something I can do with the xml parser to have it avoid that error situation, which I will experiment with. Thanks for posting the exact details of what triggered it/solved it.

As for having a check for UTF-8 without BOM, I'm not quite sure how feasible that is. From what I know and have googled in the past, it isn't possible to tell from a file what encoding it actually has. You can attempt to open it (like with an xml parser) and see if it errors (like has happened here) but I'm not sure what else you can do to identify it. Perhaps Kovid or someone may have a suggestion...
kiwidude is offline   Reply With Quote
Old 05-21-2012, 09:33 AM   #482
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,931
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kiwidude View Post
As for having a check for UTF-8 without BOM, I'm not quite sure how feasible that is. From what I know and have googled in the past, it isn't possible to tell from a file what encoding it actually has. You can attempt to open it (like with an xml parser) and see if it errors (like has happened here) but I'm not sure what else you can do to identify it. Perhaps Kovid or someone may have a suggestion...
Notepad++ can tell what the encoding is and the source for it is available via Sourceforge if you are interested in having a look at it.
JSWolf is offline   Reply With Quote
Old 05-21-2012, 12:35 PM   #483
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
Notepad++ can tell what the encoding is and the source for it is available via Sourceforge if you are interested in having a look at it.
Like everything else, Notepad++ does its best to determine what the encoding might be, but it's certainly not fail-safe.
DiapDealer is offline   Reply With Quote
Old 05-21-2012, 05:23 PM   #484
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,931
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DiapDealer View Post
Like everything else, Notepad++ does its best to determine what the encoding might be, but it's certainly not fail-safe.
But I've not seen it get UTF-8 without BOM wrong. So at least that code is working properly. And if you say there are issues determining the encoding, then the puglin should stop as maybe it could get it wrong (non-UTF-8).
JSWolf is offline   Reply With Quote
Old 05-31-2012, 01:24 PM   #485
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
SVG Covers

@kiwidude

Did you ever implement checking for SVG covers in the calibre generated titlepage.xhtml?

I'd love to update all my ePubs to have an SVG cover.

Many thanks !
paulfiera is offline   Reply With Quote
Old 05-31-2012, 03:10 PM   #486
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,931
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I cannot seem to find an option to check for broken links. I see options for checking broken image and ToC links. Also, does checking for broken ToC links get the ncx and the internal ToC? If it only does the ncx file, then a rename of the option is in order.

Last edited by JSWolf; 05-31-2012 at 04:27 PM.
JSWolf is offline   Reply With Quote
Old 05-31-2012, 03:48 PM   #487
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@paulfiera - no, obviously not yet. Thousands of lines of code related to Modify ePub has soaked up most of the last few weeks, and there have also been multiple releases of Count Pages, Generate Cover, & Reading List. Then add to that Extract ISBN got broken with calibre 0.8.53... oh yeah, I do have a day job too...

@JSWolf - correct, there is no option for general broken link checking. With recent releases of this plugin I have started tumbling down the slippery slope of all sorts of potential internal ePub content validation. My initial additions to this plugin were focused around things that calibre had responsibility for breaking (until recent fixes), like broken image links and broken NCX links. Having opened the door a crack with those, it is not unreasonable to consider other things eventually. Of course it is pretty much replicating some of FlightCrew validation, the difference being that this plugin would allow you the 50,000 foot view of which books have issues across your library, that you can then open in isolation to fix.

As for the TOC/NCX naming, that was deliberate on my part for historical consistency but it is a fair point. The issue is that the very first option I had for QC was "Check TOC with < 3 entries". That was named that way so as to not bamboozle users with the term NCX, as I would suggest only a very small subset of users would understand what an NCX is. However you are 100% technically correct that all three of those options should state NCX. Perhaps a good compromise is "Check NCX TOC with < 3 entries", and then if we ever have checks related to an inline TOC we say "Check inline TOC ..."

Oh look, 3000 posts...
kiwidude is offline   Reply With Quote
Old 05-31-2012, 04:11 PM   #488
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,791
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:
Originally Posted by kiwidude View Post

...
Having opened the door a crack with those, it is not unreasonable to consider other things eventually. Of course it is pretty much replicating some of FlightCrew validation, the difference being that this plugin would allow you the 50,000 foot view of which books have issues across your library, that you can then open in isolation to fix.
I talked to Valloric about getting a CLI interface opened on the Standalone Flightcrew so I could use your 'Open With' PI to do a Pass/Fail check and return the status to be flagged (similar to what the QC check does)

Wishing for Cake, It would be nice if it returned a Count of errors (that I coud save in a custom column) so I could prioritize repairs
theducks is offline   Reply With Quote
Old 05-31-2012, 04:31 PM   #489
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,931
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kiwidude View Post
@JSWolf - correct, there is no option for general broken link checking. With recent releases of this plugin I have started tumbling down the slippery slope of all sorts of potential internal ePub content validation. My initial additions to this plugin were focused around things that calibre had responsibility for breaking (until recent fixes), like broken image links and broken NCX links. Having opened the door a crack with those, it is not unreasonable to consider other things eventually. Of course it is pretty much replicating some of FlightCrew validation, the difference being that this plugin would allow you the 50,000 foot view of which books have issues across your library, that you can then open in isolation to fix.
One thing I was thinking is if you have a general check for broken links, you could do away with all the separate link checking as this one would be a catchall for all links that are broken be they on the ncx or some internal link and it would also catch broken links from an internal ToC and image links that are broken. That would make link checking a one option only option that does it all.

As for the TOC/NCX naming, that was deliberate on my part for historical consistency but it is a fair point. The issue is that the very first option I had for QC was "Check TOC with < 3 entries". That was named that way so as to not bamboozle users with the term NCX, as I would suggest only a very small subset of users would understand what an NCX is. However you are 100% technically correct that all three of those options should state NCX. Perhaps a good compromise is "Check NCX TOC with < 3 entries", and then if we ever have checks related to an inline TOC we say "Check inline TOC ..."

Oh look, 3000 posts...[/QUOTE]

I agree to renaming the remaining ncx checks (if you implement my suggestion above) to NCX ToC.
JSWolf is offline   Reply With Quote
Old 05-31-2012, 05:03 PM   #490
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,931
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I've noticed one other thing left out that's a constant issue especially with a lot of publisher ePub. Incorrect guide types. A lot of guide entries are made with invalid types.
JSWolf is offline   Reply With Quote
Old 05-31-2012, 06:44 PM   #491
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,791
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:
Originally Posted by JSWolf View Post
I've noticed one other thing left out that's a constant issue especially with a lot of publisher ePub. Incorrect guide types. A lot of guide entries are made with invalid types.
IMHO this is flightcrews realm. to flag incorrect use, when the proper way is to precede with other. (took me a bit to realize I needed the dot ) .
theducks is offline   Reply With Quote
Old 05-31-2012, 08:57 PM   #492
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,931
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
IMHO this is flightcrews realm. to flag incorrect use, when the proper way is to precede with other. (took me a bit to realize I needed the dot ) .
But other features of this plugin are FC's domain as well.
JSWolf is offline   Reply With Quote
Old 05-31-2012, 09:21 PM   #493
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,791
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:
Originally Posted by JSWolf View Post
But other features of this plugin are FC's domain as well.
but many are just superficial (yellow items) in Flight crew.

Flight crew could care less if there are 3 or 30 TOC items, as long as they are done correctly

so there is only a few that really point to a malformed EPUB... That is no good reason to proliferate the overlap.

BTW I am in favor of a fully populated NCX, not just that which is needed to pass the check.
theducks is offline   Reply With Quote
Old 06-01-2012, 10:25 AM   #494
cecdc7731
Member
cecdc7731 began at the beginning.
 
cecdc7731's Avatar
 
Posts: 17
Karma: 10
Join Date: Sep 2010
Location: Texas
Device: Kindle 3
Does the ASIN Check look at EXTH 113, 504 or both? Is there a way to designate which on is checked as I have been editting with mobi meta editor and putting matching numbers from Amazon in both as I go along. I would like to be able to do more edits as I have free time than just for books I am fixing to put on my Fire. Is there a way to add a quick fix that would make 113 and 504 the same? Also, can the ASIN be extracted directly from Amazon Kindle versions in the metadata editor rather than or in conjunction with the ISBN number?
cecdc7731 is offline   Reply With Quote
Old 06-01-2012, 10:45 AM   #495
morantis
Zealot
morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.morantis ought to be getting tired of karma fortunes by now.
 
Posts: 125
Karma: 769546
Join Date: May 2012
Device: none
Nice job, I am working on a web app that will search the internet based on a photo or image and find a person using the data in it. It would be nice to be able to do the same thing with cover data from a book, but harder to accomplish in the end.
morantis is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 11:39 PM.


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