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 03-04-2011, 07:12 PM   #1
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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
[GUI Plugin] Generate Cover

Users will often have books in their collection for which there is no official cover available to download, such as short fiction and articles. Calibre includes the ability to generate a cover for you from the book metadata. However currently the only control over its appearance it offers is a tweak for the font.

This plugin offers an enhanced alternative that allows you to select from your own choice of cover images and a wide range of layout/appearance options.

Main Features:
  • Add/remove your own images to a list to choose from when you generate
  • Option to use the existing book cover as an embedded image
  • Control which metadata to display and where it is located on the cover
  • Option to swap author name for users who store it in Calibre as LN, FN
  • Fine tune many aspects of cover appearance such as fonts, borders, colors and margins
  • Save your customised settings under a name to quickly recall multiple different appearances
  • Export your settings for sharing and import settings from other users
  • Option to use an image as a background rather than a content item
  • Option to add custom text to a cover, using Calibre's template language to place your choice of additional data on the cover
  • Option to auto-size text to fit on a single line for long text

Special Notes:
Sample Cover Settings:
Paypal Donations:
  • If you find this or any of my other plugins useful please feel free to show your appreciation. I have spent many hundreds of unpaid hours in their development and support so any encouragement for me to continue is appreciated!
Attached Thumbnails
Click image for larger version

Name:	Screenshot_1_Configuration.png
Views:	11661
Size:	175.6 KB
ID:	85981   Click image for larger version

Name:	Screenshot_2_Configuration.png
Views:	9739
Size:	117.0 KB
ID:	85982   Click image for larger version

Name:	Screenshot_3_Configuration.png
Views:	9751
Size:	240.5 KB
ID:	85983   Click image for larger version

Name:	Screenshot_4_Configuration.png
Views:	9122
Size:	189.4 KB
ID:	85984  
Attached Files
File Type: zip Generate Cover.zip (311.6 KB, 601 views)

Last edited by kiwidude; 03-16-2024 at 11:30 PM. Reason: New version
kiwidude is offline   Reply With Quote
Old 03-04-2011, 08:38 PM   #2
msr
Member
msr began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jul 2009
Device: Kindle2
Simply great. You're becoming the plugin king!
msr is offline   Reply With Quote
Advert
Old 03-05-2011, 02:27 AM   #3
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Thanks for this plugin.

The only thing I noticed was not being able to see all 3 numbers in the cover width and height dimensions (see attached).

This might be due to using increased font sizes but this is the only area of calibre that limits me in this way.
Attached Thumbnails
Click image for larger version

Name:	cover_plugin.jpg
Views:	4744
Size:	113.0 KB
ID:	67838  
DoctorOhh is offline   Reply With Quote
Old 03-05-2011, 04:41 AM   #4
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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
v1.0.1 Released

Oops, thats a pretty ugly screen layout dwanthy! I've pushed up a new version now. I had been through a lot of variations of layout as this was developed and I thought of new customisations, and I'd left some rather crude sizing code in there. The new version should hopefully address your issues.

Let me know how you get on - now I've figured out what to do I'll make sure I don't make the same mistake in my other plugins again.
kiwidude is offline   Reply With Quote
Old 03-05-2011, 06:06 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by kiwidude View Post
Let me know how you get on - now I've figured out what to do I'll make sure I don't make the same mistake in my other plugins again.
Looks great!
DoctorOhh is offline   Reply With Quote
Advert
Old 03-05-2011, 10:47 AM   #6
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
Attempting to customize the plugin yields the following error:

Code:
Traceback (most recent call last):
  File "/Users/griker/Documents/calibredev/calibre/src/calibre/gui2/preferences/plugins.py", line 260, in customize_plugin
    self.modify_plugin(op='customize')
  File "/Users/griker/Documents/calibredev/calibre/src/calibre/gui2/preferences/plugins.py", line 319, in modify_plugin
    if not plugin.is_customizable():
  File "/Users/griker/Documents/calibredev/calibre/src/calibre/customize/__init__.py", line 248, in is_customizable
    self.customization_help()
  File "<string>", line 59, in customization_help
AttributeError: 'GenerateCoverBase' object has no attribute 'customization_help'
But other than that, this is a very nice plugin.

G
GRiker is offline   Reply With Quote
Old 03-05-2011, 11:09 AM   #7
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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
v1.0.2 Released

I've done so many plugins now that have customisation via Preferences I clearly screwed up the situation for a plugin that doesn't and didn't rip out enough code

New version attached to the first post.
kiwidude is offline   Reply With Quote
Old 03-05-2011, 11:11 AM   #8
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
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)
Thanks kiwidude.
Perkin is offline   Reply With Quote
Old 03-05-2011, 11:21 AM   #9
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
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)
A couple of tweaks...
Can you do it so you can select the Font colour
And allow the image to be the whole background, I've got some nice leather look covers and would like the whole cover to be that, not just an inset image.
Perkin is offline   Reply With Quote
Old 03-05-2011, 02:54 PM   #10
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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by Perkin View Post
A couple of tweaks...
Can you do it so you can select the Font colour
And allow the image to be the whole background, I've got some nice leather look covers and would like the whole cover to be that, not just an inset image.
Both were on my list to investigate for a future version but I figured I would wait to see if anyone asked for them. Then you ask in the first 24 hours... lol

There is a bit of a dependency between them, since unless you have a light background you are going to want the text color changed. However I haven't figured out how to change the color since I can't find any code in Calibre related to this in the Magick libraries. I suspect it is something to do with a DrawingWand but it is yet another library I have no knowledge of. I'll ask in the developer forum here if Kovid doesn't spot this post and reply here.
kiwidude is offline   Reply With Quote
Old 03-05-2011, 03:58 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,772
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Changing text color would require additional APIs from ImageMagick to be wrapped in python, IIRC it can't be done with the currently available API.
kovidgoyal is offline   Reply With Quote
Old 03-05-2011, 04:02 PM   #12
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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Thanks Kovid, I suspected as much but nice to get confirmation
kiwidude is offline   Reply With Quote
Old 03-12-2011, 02:22 AM   #13
Iocane
Junior Member
Iocane can extract oil from cheeseIocane can extract oil from cheeseIocane can extract oil from cheeseIocane can extract oil from cheeseIocane can extract oil from cheeseIocane can extract oil from cheeseIocane can extract oil from cheeseIocane can extract oil from cheeseIocane can extract oil from cheese
 
Posts: 8
Karma: 1162
Join Date: Mar 2011
Device: Sony PRS-600
First, I want to say brilliant plugin. This and Search the Internet have both become features I can't live without!

I do have one question -- Is it possible to store multiple settings?

For example, I've mostly been generating covers in two cases:

1) Books with ... unfortunate covers. Either very small, poor quality, or just dull, and I'd like to have something a bit nicer.

2) Short stories from anthologies. When I have anthologies, I like to have each story as its own entry, as well as the full anthology itself.

Ideally, I'd like to use different settings for each kind of cover. Like using Times Roman font, and a blue background for the book covers, and using Tahoma with a green background for the short stories, and being able to switch easily between the two.

I know very little about coding so I'm not sure how tricky this would be, though.

Keep up the great work!
Iocane is offline   Reply With Quote
Old 03-12-2011, 04:58 AM   #14
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,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Thanks for the feedback and glad it has become useful to you.

Funnily enough something like what you suggest did occur to me when I wrote it. However I chose not to put it into 1.0 to see if anyone felt a need for it first, a bit like the suggestions from Perkin above.

My interim approach was to allow the user to overwrite the default settings, so that gave you one set stored, plus a second temporarily being used.

However I think the addition of the ability to save the settings as a named set would be the more flexible approach. So if you like a particular font/image for your science fiction books versus another combination for romance etc you could configure that up and then just choose from a list on the left side of the dialog.

I'll add it to the list for v1.1. Kovid has kindly made some additions to the API with 0.7.49 to allow me to set font color so I will be adding Perkin's suggestions as well.
kiwidude is offline   Reply With Quote
Old 03-12-2011, 06:44 AM   #15
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by kiwidude View Post
I'll add it to the list for v1.1. Kovid has kindly made some additions to the API with 0.7.49 to allow me to set font color so I will be adding Perkin's suggestions as well.
Font color, just in time.

Is there the possibility of using a books existing cover as the image, resizing it and using it as the image for a modified book cover?
DoctorOhh 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] User Category kiwidude Plugins 123 03-16-2024 11:59 PM
[GUI Plugin] Quick Preferences kiwidude Plugins 62 03-16-2024 11:47 PM
[GUI Plugin] Open With kiwidude Plugins 402 03-16-2024 11:44 PM
[GUI Plugin] Goodreads Sync kiwidude Plugins 1713 03-16-2024 11:37 PM
[GUI Plugin] Clipboard Search kiwidude Plugins 24 03-16-2024 11:06 PM


All times are GMT -4. The time now is 09:49 AM.


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