04-27-2011, 05:11 AM | #106 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
I think I'd have to leave the full illumination on cover handling to Kovid, I don't actually know that code. I also generally avoid epub->epub conversions for the same reasons you do and manually update covers when so motivated (which is actually infrequent).
Based on the behavior I see when adding books it seems like Calibre will grab the jpg file that represents the cover if the OPF/Guide actually specifies it as a cover - other times it just renders the html of the first page to an image, which seems to indicate that there aren't any significant heuristics going on to test if the file is a cover when the manifest is silent. As far as the things that happen during conversion, it's relatively easy to disable things that happen in the structure detection phase, which is what causes new split points, TOC changes, etc, but disabling stuff that happens later in the pipeline is pretty difficult, in particular css flattening, font size rescaling, etc. This is the bigger reason I avoid it as I don't want to change the css wholesale when the original css was good/easy to tweak in Sigil. Kovid's mentioned a framework he started called epub-fix, it's discussed a bit in this bug: http://oldbugs.calibre-ebook.com/ticket/8252#comment:5 It might offer a way to hook into some of this. Other features/functions that exist that might be able to help from a plugin are:
|
04-27-2011, 05:13 AM | #107 | |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Quote:
Doing so many by hand is quite time consuming. I'd like it (if it is possible) to be only conducted on selected books, that way If I mess it up (by removing ones I shouldn't) then it would be my fault (as most thing are). I'd hope to use it on ones I know that have been calibre'd (as I said before - for articles/short-stories) I think checking similar to the way you do (in the plugin code) for the jacket, adjusted for cover would work for my purposes, it's just the extra 'remove files and update opf' that would then need implemented in some way. Yes, adding a cover (when wanted) without conversion would also be a great addition. |
|
Advert | |
|
04-27-2011, 05:53 AM | #108 | |
Wizard
Posts: 1,761
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
Quote:
Code:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 500 749" preserveAspectRatio="none"> <image width="500" height="749" xlink:href="cover1.jpeg"/> </svg> |
|
04-27-2011, 06:24 AM | #109 | |
Calibre Plugins Developer
Posts: 4,653
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
And yeah it was the <h2> below the <h1> which caused the split as I expected. I'm sure I can come up with something to detect this. One further question - this whole thing started because you asked for the ability to remove the "extra" jackets. Would it be safer just to have a single menu option of just remove "all" jackets? And then you regenerate to add an up to date one? Or would you want to have two menu options - one to remove all, and one that removes all except for one that has the calibre metadata tag on it? I just wonder if you might get yourself in a mess not knowing what type of jacket is in what epub. For instance, if I expand the "check jacket" and "check multiple jackets" tests to cater for these extra scenarios, you aren't going to know whether your multiple jacket book has two old ones or an old one and a new one. Or indeed whether a book with a jacket has the new one or the old style one Or should we instead have a check for "legacy" jackets? Have a think about the permutations and tell me what you would like. I hate jackets myself, and remove *any* I find so I'm not representative of understanding the requirements of those who want to have one in one shape or form... |
|
04-27-2011, 06:46 AM | #110 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
The style of the existing jacket doesn't matter just as long as the existing jacket is identified in the metadata then if at any time in the future I decide to do a epub to epub conversion I know that the jacket will be replaced with the current information and format. So you would definitely like a remove all feature. |
|
Advert | |
|
04-27-2011, 07:45 AM | #111 | |
Calibre Plugins Developer
Posts: 4,653
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
Do you see the holes? And are you happy with them or do we need to tweak the above...
|
|
04-27-2011, 08:06 AM | #112 | |||
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Quote:
It may or may not be practicable to differentiate between old jackets. The option to remove excess might be limited to jacket listed in metadata versus all others. Quote:
|
|||
04-27-2011, 10:26 AM | #113 |
Calibre Plugins Developer
Posts: 4,653
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Cool. I think based on what you have said that "Remove selected excess jackets" could instead be "Remove selected legacy jackets". This will give you what you want for when a book has multiple jackets - it will keep the new one.
I think for the sake of any ongoing maintenance in a library it would be better to encourage the legacy jackets without the tags to be removed. That way if at any point you decide to reconvert a book, you aren't immediately creating a problem for yourself of a double jacket. So I would see the workflow as: Check having jackets Select all those epubs and run Remove selected legacy jackets Then run Check missing jackets Then do your conversions to add a new jacket. Under that workflow, you should never have a need to check multiple jackets. If your library is large with a lot of legacy jackets that you really don't ever intend to reconvert, then you can use Check multiple jackets. However at least this way the Remove selected legacy jackets wil be useful to you without having to do extra check/remove steps after a conversion. How does that sound? |
04-27-2011, 10:44 PM | #114 |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Sounds like a plan to me.
|
04-27-2011, 11:25 PM | #115 | |
Wizard
Posts: 1,761
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
Quote:
As I hesitate to reconvert as that might change the formatting. |
|
04-28-2011, 03:03 AM | #116 | |
Calibre Plugins Developer
Posts: 4,653
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
I think reconverting a book that has had a jacket is less of an issue, as you know that has been converted by calibre previously. Well at least if as Idolse has said above your defaults are with all the things like heuristics and splits turned off.etc. But I agree that in the longer term it should be possible to change covers and jacket without touching the rest of the book. |
|
04-28-2011, 01:55 PM | #117 |
e-Bibliophile
Posts: 60
Karma: 10
Join Date: Jun 2009
Location: California
Device: Paperwhite 1-3, Kobo AuraHD, Boox Afterglow2
|
kiwi> just wanted to note that the reason I didn't post the problem I had on this thread was because I was ignoring it, figuring it was something I could figure out myself later, and it wasn't necessary at the time. I probably (by accident) placed it in my right click menu when I was half asleep and couldn't remember how to get rid of the damned thing.
Sometimes it seems calibre has too many options and I can't find what I know is there because I think too hard about it. And no, that's not in anyway meant to say that calibre is bad. having options is nice, but if you never use them sometimes you forget where to make changes. |
04-28-2011, 02:06 PM | #118 |
Calibre Plugins Developer
Posts: 4,653
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@mehetabelo - no problem, it is a very large and complex program and I can't remember where to find stuff at times either. When you install the plugin (with relatively recent Calibre versions) you are given the choice of where to put it in terms of menus and toolbars so that would be likely how you ended up with it on your right-click menu. And as I said on the other thread Preferences -> Toolbars and changing the dropdown within that screen allows you to customise where else (or not) to put it at any point.
So is it that the only issue that annoyed you was the inconvenience of having a giant menu appear when you moused past it in the context menu? There wasn't a functional issue with it? |
04-28-2011, 02:45 PM | #119 |
e-Bibliophile
Posts: 60
Karma: 10
Join Date: Jun 2009
Location: California
Device: Paperwhite 1-3, Kobo AuraHD, Boox Afterglow2
|
@kiwi. No, no functional issue. My problem is the massive quality problems in my dump DB. It's slowly being whittled down, and I'm sure I'll find things to suggest or possibly bugs, and I'll bring them up as I see them.
As for installing it, I don't think that was the problem. It's possible, but I think I was just screwing around with the toolbar and somehow switched the option when I wasn't paying enough attention usually when I sit down to work on my database it's late, and I'm tired, so sometime I miss things that should be obvious. The real annoyance was because everytime during cleanup I was trying to delete a specific format after converting/cleaning it up (often times for older books that have serious need of physical cleanup, I convert to rtf and I have about a dozen macros in word that do some standardized cleanup for me and add a navigation/toc then export as stripped html) I would be on the delete menu and then it would jump to the QC menu. This is because I have my mouse set pretty sensitive and the menu's where right next to one another. Drove me nuts for about an hour and then I just dumped QC when I couldn't remember how to get stuff out of the context menu. |
04-28-2011, 02:53 PM | #120 |
Addict
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
|
Hi Kiwidude
2 questions. 1. Is it possible to add some series tests? like: -Series Missing Parts Spoiler:
-Series Having Duplicates Spoiler:
-Series Having Indexing Errors Spoiler:
-Magazine Items Missing Spoiler:
-Magazine-Series Having Index Errors Spoiler:
2. Where do you get the 'Title Case Information'? I have some problems with it, All books having the word macht have to be written as MacHt (capital H). I think I made a mistake somewhere but I do not know where. I also would like change this behaviour so only the first word and names get capitals, but I think I have to change a regex than. |
|
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 |