Ok folks, this is likely to be the next version of this plugin attached to this post. As it has some big new features I would appreciate it if a few of you could give them a whirl and offer some feedback so I can officially release it.

To briefly summarise them (see the screenshots too):

Ability to export and import settings including the related image (to allow users to easily share their favourite cover settings on this thread)

Ability to change alignment of each text item rather than always centered.

Right margin now as a separate option (rather than defaulting to same as left margin so allows indenting)

Allow font sizes larger than 99pt

API support for JimmXinu (or others) to invoke

Any issues (or if it all works fine for you) - please let me know asap either on this thread or via PM.

Attached Thumbnails

Last edited by kiwidude; 05-01-2012 at 05:57 PM.
Reason: Remove attachment while work on next version

New attachment above. If those who downloaded don't have a backup of your "pre-upgrade" file (like I see you do), then manually edit your Generate Cover.json file and change this:
"SchemaVersion": 1.41,
to
"SchemaVersion": 1.40,

This will force the plugin to correctly upgrade the file to prevent any future errors once you restart calibre.

Yeah that is normal, it is iterating through each of your saved settings. I contemplated putting the name in the output but got lazy, but since you mentioned it I'll stick it in the final release.

Edit: The new version with improved logging is attached above. If you have already "upgraded" your config file you will have to use an old json backup or the schema version fudge in my post above to see the new logging (since upgrading the json config file is a one off event).

kiwidude - I'm able to make changes to a saved setting and use it (click OK) without saving it. Next time I open GC, that saved setting is still selected, still changed and still unsaved. Is that the intended behavior?

It confused me while testing calling from outside because the changes I last made weren't saved after I hit OK.

Maybe GC could offer to save changes when you hit OK? Not critical, but I can also see where a user would be changing settings, trying them out, then quit calibre without realizing they need to go back in and saved them explicitly.

Thats an old behaviour (not new to this release). I've always been in two minds about it.

The thing is, when the user clicks OK they are saying they want to go ahead and generate with the current setting. That is not "necessarily" the same thing as saying they want that setting saved - after all they may be experimenting just to see what it looks like when made larger etc. So either:
- I don't have a prompt and it *is* treated as a Save at the same time, or
- I do have a prompt and the user has to make another decision click right then.

Right now it supports a user experimenting without committing to save, and continuing to experiment without having to start again. But perhaps I am just being too flexible. Users could just click on the Add button and have an "Experimental" setting that they use for playing with.

Ok, here is a (hopefully) improved version for testing. Thanks to Jim for spotting some issues both old and new.

As mentioned above there is a new Autosave settings checkbox to automatically save any changes you make to a setting at various points you would otherwise get prompted:

- When you switch to another setting. Behaviour as it is currently of being prompted to save or discard their changes.
- When you Import or Export. New for this release is to prompt to save/discard as above.
- When you click OK to generate a cover. New to this release is a prompt allowing the user to Save setting (generates with new values), Discard changes (generates with reverted values) or Don't save yet (like current behaviour, generates with new values but does not overwrite setting so you can Revert later).
- When you click Cancel. New for this release is to always discard any unsaved settings - regardless of whether autosave is checked or not.

I've also fixed a couple of other longer term bugs - like when a font is missing as Jim found above. It will now revert to the default font without an error displayed (applies to your own or imported settings). The debug window will display the name of the font that could not be found.

Version number bumped up to 1.5, hopefully no other gremlins in there but if some kind folks could give this a quick sanity check it would be appreciated.

Last edited by kiwidude; 05-02-2012 at 04:25 PM.
Reason: Removed attachment as latest version officially released