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 10-06-2014, 05:05 PM   #496
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,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You could rename 'generate_cover.json' to something else and see if that works.
You will lose all cover cover template settings ore you can carefully edit the bad 'name' value to choose one that exists
theducks is offline   Reply With Quote
Old 10-06-2014, 05:59 PM   #497
Pocket of Books
Junior Member
Pocket of Books began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2014
Device: Marvin, Nook Glow
Better Red.... Thanks for your reply. I did find that my font book had most of the fonts disabled (no idea why). I enabled them all, but it still didn't fix my problem. How do I find out what font Generate Cover is looking for without being able to get into the plugin? This is probably obvious, but I'm not seeing it. Thank you for any help.
Pocket of Books is offline   Reply With Quote
Advert
Old 10-06-2014, 06:15 PM   #498
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,689
Karma: 54369090
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 Pocket of Books View Post
Better Red.... Thanks for your reply. I did find that my font book had most of the fonts disabled (no idea why). I enabled them all, but it still didn't fix my problem. How do I find out what font Generate Cover is looking for without being able to get into the plugin? This is probably obvious, but I'm not seeing it. Thank you for any help.
The JSON file in the config folder\Plugins

It can be opened with Notepad(++)
theducks is offline   Reply With Quote
Old 10-07-2014, 12:17 AM   #499
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,458
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Pocket of Books View Post
Better Red.... Thanks for your reply. I did find that my font book had most of the fonts disabled (no idea why). I enabled them all, but it still didn't fix my problem. How do I find out what font Generate Cover is looking for without being able to get into the plugin? This is probably obvious, but I'm not seeing it. Thank you for any help.
@Pocket of Books - as per post 496 from theducks, close calibre and rename %CALIBRE_CONFIG_DIRECTORY%\plugins\Generate Cover.json to something like ...over.json.save. The PI should create a new Generate Cover.json that will allow you to ensure that it works on 'default settings'

If you've only got a few pro-forma covers it may be easier to recreate them, you'll find the images in the %CALIBRE_CONFIG_DIRECTORY%\resources\images\genera te_cover folder. Otherwise once you know the PI is working then you could edit the original json file to replace the font names with something 'boring' like Times New Roman. You'd need to change the value of "name", from say Freestyle Script to Times New Roman, in lines such as these:

Code:
"fonts": {
        "title": {
          "size": 42, 
          "name": "Freestyle Script", 
          "align": "center"
        }, 
        "series": {
          "size": 18, 
          "name": "Freestyle Script", 
          "align": "center"
        }, 
        "custom": {
          "size": 18, 
          "name": "Forte", 
          "align": "center"
        }, 
        "author": {
          "size": 36, 
          "name": "Freestyle Script", 
          "align": "center"
        }
      },
BR

Last edited by BetterRed; 10-07-2014 at 12:20 AM.
BetterRed is online now   Reply With Quote
Old 10-08-2014, 11:04 AM   #500
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
It would be really nice if you could set conditions for the different covers like with icons.
Tanjamuse is offline   Reply With Quote
Advert
Old 10-09-2014, 08:18 PM   #501
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Pocket of Books View Post
I'm getting the following message upon using "Generate Cover":ERROR: Unhandled exception: <b>KeyError</b>:u'generate_cover_title_font'.
I've had a FFDL user report this same issue (FFDL can call GC), so I was investigating it. And it looks like it is a real problem with fresh calibre installs caused by the fact that calibre's tweaks no longer have a generate_cover_title_font value.

I see the same issue with GC running in a fresh portable install.

The relevant code in GC is:

Code:
...
from calibre.utils.config import tweaks
...
def get_font_or_default(font_name):
    default_font = tweaks['generate_cover_title_font']
...
The attached test version changes that to:

Code:
...
from calibre.utils.config import tweaks
...
def get_font_or_default(font_name):
    default_font = tweaks.get('generate_cover_title_font',None)
...
...so it works for both fresh installs and existing that have generate_cover_title_font set to something. (Also changes the only other 'tweaks' value in the PI similarly.)

If I can a confirmation or two of the problem and that this fixes it, I'll ask Kovid to update the release version.

Last edited by JimmXinu; 04-03-2015 at 04:46 PM. Reason: Remove obsolete test versions - replaced by newer test or released version.
JimmXinu is offline   Reply With Quote
Old 10-10-2014, 02:44 AM   #502
Feynor
Enthusiast
Feynor began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Sep 2013
Device: Samsung Galaxy Note 10.1 2014 ed. with Moon Reader+ and Google Books.
Thumbs up

Quote:
Originally Posted by JimmXinu View Post
If I can a confirmation or two of the problem and that this fixes it, I'll ask Kovid to update the release version.
I can confirm that your fix works. Thanks

Win 7 64-bit
Calibre 2.5 64-bit
Feynor is offline   Reply With Quote
Old 10-10-2014, 06:47 AM   #503
Pocket of Books
Junior Member
Pocket of Books began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2014
Device: Marvin, Nook Glow
I too can confirm that the new version fixed my problem. I can stop banging my head against the wall now. I appreciate all the help.
Pocket of Books is offline   Reply With Quote
Old 12-22-2014, 07:37 PM   #504
MononWalker
Junior Member
MononWalker began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2014
Device: Nook HD & iPod Touch
Problem with Custom text

Hi folks ... I know I'm probably doing something wrong, but I'm having a slight problem with the custom test.

Using FDDL, I've generated a custom column for Category (i.e. Fandom) for what JimmXinu generates for the metadata. When I try and put that value ({Category}) into the custom text of GC, I get an error on the preview "GC template error Value: unknown field category"). I can put other values in there (e.g. {publisher} to get the site name, {pubdate} to get the publishing date, etc.).

Like I said, I'm pretty sure I'm doing something wrong but for the life of me I cannot figure out what

Thanks in advance for any assistance
MononWalker is offline   Reply With Quote
Old 12-22-2014, 08:12 PM   #505
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by MononWalker View Post
...
When I try and put that value ({Category}) into the custom text of GC, I get an error on the preview "GC template error Value: unknown field category"). I can put other values in there (e.g. {publisher} to get the site name, {pubdate} to get the publishing date, etc.).
Custom columns always have '#' at the beginning of their lookup/search name. And they don't have to match the 'display' name.

Hover your mouse of the column header for that column and it will pop a tooltip that tells you the lookup/search.
JimmXinu is offline   Reply With Quote
Old 01-24-2015, 10:47 PM   #506
miajoshua
Mia
miajoshua began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2015
Device: iPad Air 2, Marvin, Calibre
Much appreciation for @kiwidude for creating this plugin and spending time to improve it and taking requests for adding more features. I've been lurking for awhile and seeing all the wonderful feedback and assistance and free advice and support in the community. Also kudos to @JimmXinu for continuing to tweek and assisting with bugs and the development with FFDL without which my e-reader would be empty.

I've been attempting to produce slightly more advance covers and have ran into a little problem (a few people have mentioned similar problems on this forum but a solution has yet to be found). I'm trying to include a summary on my cover, so in addition to title, author, series, in the custom text column, I have: Summary: {comments}. However, each time, the <html tags> shows up and when I try using regular expressions to convert, it fails.

I admit I have a very novel understanding of Calibre's template language so my ignorance might be part of the problem, but I would really appreciate some advice or assistance. Thank you.
miajoshua is offline   Reply With Quote
Old 01-25-2015, 12:08 AM   #507
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Well, after that bit of, let's say ego stroking, I looked into it a bit.

It took me a few tries figure out that the regex function in templates *doesn't* want string delimiters (" or ') around it's args. This seems to work for me:
Code:
{comments:re(<[^>]+>, )}
JimmXinu is offline   Reply With Quote
Old 01-25-2015, 07:28 PM   #508
sp000n
Junior Member
sp000n began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2009
Device: Sony PRS 700
I'm trying to establish a workflow to generate a PDF cover from page X (default page 1) of the file for groups of files. Currently, the ability exists in Calibre to edit metadata, select the cover button, and choose the page from several rendered options. It's slow, however, so it would be nice to point a script at a library to have it complete the job.

Is there a way to do it with this plugin?
sp000n is offline   Reply With Quote
Old 01-25-2015, 11:08 PM   #509
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,458
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by sp000n View Post
I'm trying to establish a workflow to generate a PDF cover from page X (default page 1) of the file for groups of files. Currently, the ability exists in Calibre to edit metadata, select the cover button, and choose the page from several rendered options. It's slow, however, so it would be nice to point a script at a library to have it complete the job.

Is there a way to do it with this plugin?
@sp000n - No, this plugin is about making a cover page from an external image and the metadata - which must then be put into the book format files.

I don't think there are any PIs that extract data from format files, it's all done by the core product. If I were you I would search for something like "extract first image from PDF" - I suspect its doable with imagemagik or exiftool.

BR
BetterRed is online now   Reply With Quote
Old 01-26-2015, 01:21 AM   #510
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Or, depending on what pdf-reader you usess.

Just extract the first page as an image directly?

I know it can be done in Adobe Reader Pro
Tanjamuse 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 06:14 PM.


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