Skip to content

Cover Settings Calibre Plugin

Jim Miller edited this page Sep 6, 2022 · 10 revisions

Work In Progress

This document is not complete and does not apply prior to FanFicFare v4.16.

Calibre Cover Settings in the FanFicFare Plugin

Starting in FanFicFare v4.16, the settings used to control Calibre Covers for downloaded books are somewhat changed. Issue 878 details why the Update EPUB Cover? checkbox was removed; it will not be mentioned further here.

As with so many things in FanFicFare, some parts are controlled in the Plugin's GUI Config dialog while other parts are controlled by settings in personal.ini. This document will try to explain how to use both to fulfil some common use cases.

FanFicFare > Config > Calibre Cover

Default Settings for New Users

To summarize in a smaller form that I will use for later examples:

Settings:

  • Update Calibre Cover (from EPUB): Yes, if EPUB has a cover image
    • Set Calibre Cover Only for New Books: Off
  • Generate Calibre Cover: Yes, unless FanFicFare found a cover image
    • Generate Covers Only for New Books: On
    • Inject/update the generated cover inside EPUB: Off
    • Which GC radio button: Calibre Generate Cover

These settings mean FanFicFare will:

  1. Set the Calibre cover using the downloaded cover image for the story, if it found one, on every download and update.
    • This will pick it up if the story cover changes.
  2. Generate a cover if there isn't a cover image in the story.
    • But only when new, because Calibre's Generate Cover is random every time.
  3. Use Calibre's builtin Generate Cover by default because the Generate Cover plugin is optional.

A typical example of a Calibre generated cover (shrunk to 25% for page placement purposes):

Some basic changes you could make from this setup are:

  • Set Set Calibre Cover Only for New Books: On to only get the cover from the story the first time you download a it.
    • Useful if you like making custom covers and don't want them changed.
    • However, you will miss out if the author changes the story cover.
  • Set Generate Covers Only for New Books: Off to get a random generated cover on every update.
    • Calibre's Generate Cover is configurable, but that's outside the scope of this document.
  • Set Inject/update the generated cover inside EPUB: On, the randomly generated cover will also be put inside the EPUB.
    • Typically, I do not recommend this--it complicates matters with more involved setups. But some users like it.

Now two more different options for when the story doesn't have a cover image:


Settings to Render Title Page when No Cover Image

(This is a simplified version of the setup JimmXinu uses.)

Settings:

  • Update Calibre Cover (from EPUB): Yes, Always
    • Set Calibre Cover Only for New Books: Off
  • Generate Calibre Cover: No

These settings mean FanFicFare will:

  1. Set the Calibre cover using the downloaded cover image for the story, if it found one, on every download and update.
    • This will pick it up if the story cover changes.
  2. When there's no cover image in the EPUB, render Title Page (the first page of the epub) as an image and use it as the cover.
    • Depending on several factors, the Title Page may render too small to be useful. You can increase it with CSS in personal.ini, adjust the numbers to taste:
[epub]
add_to_output_css:
 body.fff_titlepage {font-size: 3vmax; margin: 1vmax;}

A typical example (shrunk to 25% for page placement purposes):

Some basic changes you could make from this setup are:

  • Set Set Calibre Cover Only for New Books: On to only get the cover from the story the first time you download a it.
    • Useful if you like making custom covers and don't want them changed.
    • However, you will miss out if the author changes the story cover, keeping rendered title pages forever.

Settings for a Default Image when No Cover Image

You will need to have at least one default cover image saved to use. However, you can also easily use different images for different sites.

Settings:

  • Update Calibre Cover (from EPUB): Yes, Always

    • Set Calibre Cover Only for New Books: Off
  • Generate Calibre Cover: No

  • In personal.ini add a default_cover_image setting or settings:

[defaults]
default_cover_image:file:///C:/Users/YourUser/Documents/fff covers/default.jpeg
## ...
[archiveofourown.org]
default_cover_image:file:///C:/Users/YourUser/Documents/fff covers/ao3.jpeg

These settings mean FanFicFare will:

  1. Set the Calibre cover using the downloaded cover image for the story, if it found one, on every download and update.
    • This will pick it up if the story cover changes.
  2. When there's no cover image in the the story, FFF will instead put the configured default_cover_image in the EPUB.
    • The default_cover_image is copied into the EPUB during download--that's why it's a personal.ini setting.
    • If a cover image is later added to the story by the author, it will replace the default on update.

Some basic changes you could make from this setup are:

  • Set Set Calibre Cover Only for New Books: On to only get the cover from the story the first time you download a it.
    • Useful if you like making custom covers and don't want them changed.
    • However, you will miss out if the author changes the story cover, keeping the default image forever.

Settings to Use Generate Cover Plugin when No Cover Image

The Generate Cover plugin (sometimes just GC) is highly configurable and lets you control many aspects of the resulting cover. For example, you can include the values of various Calibre columns in the generated cover.

For this example, we assume you are using GC basic settings without an image or with a static image, but not {Current Cover}.

To use this configuration, you will need to:

  1. Install the Generate Cover plugin
  2. Create or customize at least one GC setting, either with out and image or with a static image, but not {Current Cover}.
  3. Note the name of your GC setting(s).

Settings:

  • Update Calibre Cover (from EPUB): Yes, if EPUB has a cover image
    • Set Calibre Cover Only for New Books: Off
  • Generate Calibre Cover: Yes, unless FanFicFare found a cover image
    • Generate Covers Only for New Books: Off
    • Inject/update the generated cover inside EPUB: Off
    • Which GC radio button: Plugin Generate Cover
    • Generate Cover(Plugin) Settings:
      • Default: (Your GC setting name)
      • You can also create and select GC settings for specific fanfiction sites.

These settings mean FanFicFare will:

  1. Set the Calibre cover using the downloaded cover image for the story, if it found one, on every download and update.
    • This will pick it up if the story cover changes.
  2. Generate a cover if there isn't a cover image in the story.
    • If you configured a GC setting for a particular site, it will be used.
    • Otherwise the one you set for Default will be used.
    • No cover will be generated if there isn't a site or Default GC setting selected.
    • GC will run every update, because GC covers are much more likely to include changes, like if you put chapters, word count, etc, in the GC setting.

Some basic changes you could make from this setup are:

  • Set Set Calibre Cover Only for New Books: On to only get the cover from the story the first time you download a it.
    • Useful if you like making custom covers and don't want them changed.
    • However, you will miss out if the author changes the story cover.
  • Set Generate Covers Only for New Books: On only generate the cover once.
    • A minor performance improvement if you don't include anything that changes in your GC setting.
    • Generated cover will still be replaced if the story has a cover added by the author.
  • Set Inject/update the generated cover inside EPUB: On, the GC generated cover will also be put inside the EPUB.
    • Typically, I do not recommend this--it complicates matters with more involved setups. But some users like it.

Settings to use Generate Cover Plugin WITH Story Cover Image

The Generate Cover plugin (sometimes just GC) is highly configurable and lets you control many aspects of the resulting cover. For example, you can include the values of various Calibre columns in the generated cover.

For this example, we assume you are using GC settings that do use {Current Cover}.

This example depends on having default_cover_image settings so that all EPUBs downloaded have a cover image.

To use this configuration, you will need to:

  1. Install the Generate Cover plugin
  2. Create or customize at least one GC setting, using {Current Cover} for the image.
  3. Note the name of your GC setting(s).

Settings:

  • Update Calibre Cover (from EPUB): Yes, Always

    • Set Calibre Cover Only for New Books: Off
  • Generate Calibre Cover: Yes, Always

    • Generate Covers Only for New Books: Off
    • Inject/update the generated cover inside EPUB: Off
    • Which GC radio button: Plugin Generate Cover
    • Generate Cover(Plugin) Settings:
      • Default: (Your GC setting name)
      • You can also create and select GC settings for specific fanfiction sites.
  • In personal.ini add a default_cover_image setting or settings:

[defaults]
default_cover_image:file:///C:/Users/YourUser/Documents/fff covers/default.jpeg
## ...
[archiveofourown.org]
default_cover_image:file:///C:/Users/YourUser/Documents/fff covers/ao3.jpeg

These settings mean FanFicFare will:

  1. Set the Calibre cover using the downloaded cover image for the story, if it found one, on every download and update.
    • This will pick it up if the story cover changes.
    • The default_cover_image will be used if there isn't a cover provided by the author.
  2. Generate a cover using the cover image from the EPUB.
    • Because you configured the GC setting to use {Current Cover}, and FFF puts the EPUB cover into Calibre cover just before GC runs, for that brief moment, it is the {Current Cover}.
    • If you configured a GC setting for a particular site, it will be used.
    • Otherwise the one you set for Default will be used.
    • No cover will be generated if there isn't a site or Default GC setting selected.
    • GC will run every update, because GC covers are much more likely to include changes, like if you put chapters, word count, etc, in the GC setting.

Some basic changes you could make from this setup are:

  • Do NOT Set Calibre Cover Only for New Books: On

    • Because you are generating a cover every update, if the EPUB cover is not brought into Calibre each time before running GC, the previously generated cover will be used, leading to a cover within cover, one recursion deeper every update.
  • Set Generate Covers Only for New Books: On to only generate the cover once.

    • Also need to set Set Calibre Cover Only for New Books: On, otherwise the GC cover will be replaced on update.
    • A minor performance improvement if you don't include anything that changes in your GC setting.
  • Set Inject/update the generated cover inside EPUB: On, the GC generated cover will also be put inside the EPUB.

    • Typically, I do not recommend this--it complicates matters with more involved setups. But some users like it.
Clone this wiki locally