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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2012, 03:13 PM   #376
greeniron
Junior Member
greeniron began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2012
Device: Kindle paperwhite
Problem with multiple settings

I use multiple settings, usually with different images. I don't know how it's happening but some of the settings have become tied together. So if I want to change the image for the Avengers setting, it will tell me that I'm changing the setting for X-Files. If I try to delete the Avengers setting, it will tell me I'm deleting the setting for X-Files. If I do this and then try to delete the Avengers setting afterwards, I get the following error message:


calibre, version 0.9.8
ERROR: Unhandled exception: <b>KeyError</b>:u'X-Files'

Traceback (most recent call last):
File "calibre_plugins.generate_cover.dialogs", line 524, in remove_setting
KeyError: u'X-Files'



I love the plugin in general but this has been a real problem for me. Thank you for your help.
greeniron is offline   Reply With Quote
Old 12-05-2012, 03:51 PM   #377
kiwidude
calibre/Sigil 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,220
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Chris Jones - as you likely have suspected by now there is no way to automatically choose a cover profile based on some attribute of the book such as a tag or custom column. Nor are settings remembered outside of allowing you to save custom profiles. What I suggest you do is save different profiles for your different cover variations, and then use calibre searches to bring back the subset of books that match that desired profile to select them all and generate cover for.
kiwidude is offline   Reply With Quote
Old 12-05-2012, 03:53 PM   #378
kiwidude
calibre/Sigil 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,220
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@greeniron - welcome to MobileRead.

That was a problem with very old versions of this plugin but shouldn't be happening nowadays. Either attach your "Generate Cover.json" file from the plugins file or PM/email it to me (you can find my email address inside the zip file at the top of any of the .py files). You find that json file in your calibre configuration folder in the plugins subfolder (Preferences->Misc->Open calibre configuration)
kiwidude is offline   Reply With Quote
Old 12-07-2012, 06:15 AM   #379
kiwidude
calibre/Sigil 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,220
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Beta for 1.5.8 release

@greeniron (and others welcome please) - give the attached version of the plugin a go. On startup it will "fix" your corrupted configuration file. You might find that the names your settings have don't reflect values that you have renamed them to after they were first created - just use the rename operation again on them and hopefully this time they won't get messed up.

As I mentioned above a very old version of the plugin did have a bug which could create this situation your config file is in, where the wrong setting would get overwritten. I thought I had fixed this in 1.5.0 - either I fixed the cause but not the corrupted files themselves, or there is still a bug in there.

I have added an ongoing check in there which will run every time you open the Generate Cover dialog. It will revalidate your configuration file, fix any errors and then display a big error dialog if any were found. Hopefully no-one ever sees this. If they do, then it means there is still a bug in the plugin somewhere, in which case please report your exact clicks and actions you had made in the Generate Cover dialog last time you opened it. Even better, please try them yourself again to verify you can replicate it *before* you post on this thread.

Let me know if any issues found (or if you find an ongoing corruption scenario) and I will officially release in the next day or so.

Last edited by kiwidude; 12-09-2012 at 12:42 PM. Reason: Removed attachment as officially released
kiwidude is offline   Reply With Quote
Old 12-08-2012, 02:28 PM   #380
Chris Jones
Enthusiast
Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.Chris Jones is not intimidated by interfenestral monkeys.
 
Chris Jones's Avatar
 
Posts: 42
Karma: 26686
Join Date: Oct 2012
Device: none
Re: Easier retrieving of existing covers' settings..?

Quote:
Originally Posted by kiwidude View Post
@Chris Jones - as you likely have suspected by now there is no way to automatically choose a cover profile based on some attribute of the book such as a tag or custom column. Nor are settings remembered outside of allowing you to save custom profiles. What I suggest you do is save different profiles for your different cover variations, and then use calibre searches to bring back the subset of books that match that desired profile to select them all and generate cover for.
Thanks for your quick reply.

And as you likely suspect.. what I was getting at is that such a nicely thought out mini-application is bound to cause at least some users to invest a lot of time designing high-quality covers that they will be tempted to keep improving.

In other words, I was politely asking that you might want to consider such an enhancement..

Alas your reply leads me to think that from the developing angle, it would be far from trivial to implement such changes.. therefore "not going to happen"..?

I can live with it: as you recommend, what I do at this point is create a bunch of "profiles", using the full/exact author's name followed by a number so I have no problems finding one particular subset of "settings" and only have to go through it sequentially when I need to retrieve the settings of an existing cover.

Here are a couple more features that would come in handy and might be easier to implement:

1. It would be a lot more flexible if one could (also) enter or adjust the title and author(s) manually.

Using the contents of calibre's #author and #title is usually fine, but I ran into scenarios where I had to change them temporarily to generate a given cover.

An example to clarify: the title of the book is something like "Nice Novel with Longish Title — Volume I". So that it remains somewhat legible on the resulting cover, I specify a point size of, e.g. 24.. and this gives me the following layout:

---------------------------------------------
Nice Author

Nice Novel with Longish Title
— Volume I
---------------------------------------------

Of course, this won't do.. so, I have to exit Generate Cover, remove the em-dash (?) in calibre's #title, go back into GC, generate the cover, exit/save, and edit back the title to what it initially was.

There are a bunch of other cases where it would give the user significantly more control if there were extra (hidden?) data entry fields both for the author and the title, the first one being by default automatically filled out with the contents of the calibre author/title variables (quite sufficient in most cases) but giving the user the option to manually enter/edit/tweak title and author to meet his current requirements.

2. It would be nice to have some form of "gallery" feature so as to be able to quickly pull one's custom covers (as opposed to all the stuff downloaded from the web)... to be able to use them as a source of inspiration for new stuff... show off one's best efforts to friends and family... make it easier to upload them to one's web site.. share the stuff on social networks.. email it to Mom.. etc. Perhaps some custom column filled automatically by Generate Cover might make it possible to restrict calibre's display to "those books whose cover was generated by GC" might do the trick with (practically) no extra coding..?
Chris Jones is offline   Reply With Quote
Old 12-08-2012, 07:04 PM   #381
kiwidude
calibre/Sigil 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,220
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Chris - If it was trivial I would have offered a more reassuring response about me adding it than just suggesting the best workaround I could think of

I'm not saying "never" for retrieving a setting based on the selected book, but it adds a lot of complexity for a very niche usage and would be a lot of work. And it creates all sorts of other issues that have to be thought about. For instance lets say I allowed a user to associate a book tag with a named saved settings profile. So you setup a saved cover setting for "Science Fiction" and another for "Fantasy". What do you do if a book is tagged with both? What do you do if a book has neither - at the moment the plugin by default shows the last cover settings you used, but that might "confuse" users who become unsure as to whether the setting was chosen because it matched the book or it didn't match anything. And what do you do if the user selects a mix of books, since you can only edit/apply one setting at a time? It very quickly becomes convoluted and hence time consuming to design and implement.

Your request re editing the metadata in order to fit better does sound more generally useful, for those who are like you taking more care with what gets generated. However again it falls apart for users who have multiple books selected and I don't see an easy way around that beyond disabling the feature in that scenario.

The final suggestion re identifying books that have had a generated cover applied by setting a tag or custom column sounds a little "easier" to implement. I don't see many users utilising it, but I vaguely recall one other user asking how to identify such covers in the past.

Thanks for taking the time to post the detail of your requests.
kiwidude is offline   Reply With Quote
Old 12-09-2012, 12:43 PM   #382
kiwidude
calibre/Sigil 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,220
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
v1.5.8 Released

Changes in this release:
  • Automatically "correct" any corrupted json files when users upgrade to this version
  • Check for corruption every time Generate Cover is opened. If found, show error dialog and autofix.
  • Prevent plugin being used in Device View or on Device View context menu
kiwidude is offline   Reply With Quote
Old 12-10-2012, 12:02 PM   #383
kiwidude
calibre/Sigil 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,220
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Beta for v1.5.9

This version adds a couple of features asked for above:
  • On the Content tab you can now customise the Title/Author/Series text if you want to temporarily tweak it to for how you like on the cover. Only works if you have a single book selected.
  • In the overall preferences for the plugin (also accessible via a new "Customize" button on the dialog) you can specify a custom column or tags to be applied for any books you generate a cover for.
Give it a whirl and let me know if any probs before I officially release it in a day or two...

Last edited by kiwidude; 03-05-2013 at 10:52 PM. Reason: Removed attachment as officially released
kiwidude is offline   Reply With Quote
Old 03-02-2013, 01:12 PM   #384
greeniron
Junior Member
greeniron began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2012
Device: Kindle paperwhite
I'm running into a problem where when I create a new cover style, I get an error message and the new style replaces the old style. I get the following error message when I restart the plug-in:

calibre, version 0.9.21
ERROR: Corrupted Configuration File: <p>Your configuration file was corrupted (see Details).</p><p>Please report your exact recent actions which led to this on the MobileRead forum thread for this plugin so the can fix it.</p><p>The configuration has been fixed automatically.</p>

Corrupted setting: "Star Trek 2" has incorrect internal name of: "XM Lorna"

Both Calibre and the plug-in are up to date. I feel like this problem restarted after the last update but I'm not sure.
greeniron is offline   Reply With Quote
Old 03-03-2013, 07:43 AM   #385
kiwidude
calibre/Sigil 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,220
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@greeniron - when you say you are using the latest version, do you mean the version from the first post of this thread or the version in the post above of the beta for 1.5.9 (which it seems I forgot to officially release).

PM me a link to your Generate Cover.json file from the calibre configuration plugins folder (or rename it to a .txt and attach it to a post) so I can take a look.
kiwidude is offline   Reply With Quote
Old 03-03-2013, 04:19 PM   #386
Vaesse
Connoisseur
Vaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolate
 
Vaesse's Avatar
 
Posts: 95
Karma: 33020
Join Date: May 2011
Device: Kindle 3 WiFi
I'm tweaking my script covers again... plus I've finished a bunch more. I'll update/upload when I'm done. However, I've encountered a small speed bump.

I'm trying to do something I've never done before and it's not working quite like I expected it to (which would have been very straightforward). On my scripts, I've put the original air date of the episode/movie in the "PubDate" field. I wanted this to appear on the cover next to the series index (which is the season/episode number). I tried changing:

Episode {Series_Index}
to
Epidose {Series_Index} - {PubDate}

and several variations (Date in parens, standing alone, etc.) in both the custom text and "Series text" fields, and can't get it to show up. What am I missing?
Vaesse is offline   Reply With Quote
Old 03-03-2013, 07:41 PM   #387
kiwidude
calibre/Sigil 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,220
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Vaesse - try this:
Code:
Episode {series_index} - {pubdate:format_date(yyyy)}
kiwidude is offline   Reply With Quote
Old 03-04-2013, 08:23 AM   #388
Vaesse
Connoisseur
Vaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolate
 
Vaesse's Avatar
 
Posts: 95
Karma: 33020
Join Date: May 2011
Device: Kindle 3 WiFi
That shows:

fomat_date: unknown function

Where without that extra code it shows a blank where the date should be.

EDIT: I'm using the "official" release from the plugin manager, not the beta from a few posts up.
Vaesse is offline   Reply With Quote
Old 03-04-2013, 08:40 PM   #389
kiwidude
calibre/Sigil 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,220
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Works perfectly fine for me Vaesse, with latest calibre 0.9.21 and yes I am using that "beta" release of the code. Give that one a whirl. I was going to officially release it but was waiting to see whether greeniron responds about their issue to see if there is another fix that needs to be slipped into it.
kiwidude is offline   Reply With Quote
Old 03-05-2013, 08:52 AM   #390
Vaesse
Connoisseur
Vaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolateVaesse is generous with chocolate
 
Vaesse's Avatar
 
Posts: 95
Karma: 33020
Join Date: May 2011
Device: Kindle 3 WiFi
OMG, I'm an idiot! I've been working on putting in the publication dates, but when I went to test the new cover, I've CONSISTENTLY picked the next one to be worked on... in other words, a script with no publication date. So, it makes complete sense that it would show nothing.

The error disappeared after I restarted Calibre (I'd done two plugin updates and not bothered to restart as I wasn't working with those plugins).
Vaesse 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
[GUI Plugin] Goodreads Sync kiwidude Plugins 637 04-15-2014 02:20 PM
[GUI Plugin] Open With kiwidude Plugins 216 03-18-2014 02:23 AM
[GUI Plugin] Quick Preferences kiwidude Plugins 25 07-31-2013 01:59 PM
[GUI Plugin] User Category kiwidude Plugins 32 04-20-2013 10:19 AM
[GUI Plugin] Clipboard Search kiwidude Plugins 4 09-11-2011 06:14 AM


All times are GMT -4. The time now is 08:54 PM.


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