06-24-2020, 11:44 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2020
Device: Windows 10 PC: Calibre
|
Using {comments} in Cover Generation
Hi all,
I did some digging and didn't see any topics about this, but I'm not so good with Calibre's template language or html so this might be a dumb question. I'm trying to get Calibre cover generator to display the text from the book's comments field in the cover's subtitle area. I tried simply using "{comments}" and that seems to work... except the cover displays <div> and <p> html tags also. Here's an imgur link to an example picture: https://imgur.com/a/vzY8BBZ Anyone know if this is solvable? |
06-25-2020, 12:25 AM | #2 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, I'm afraid not, the cover generator cant render HTML only plain text.
|
Advert | |
|
06-25-2020, 12:55 AM | #3 |
Bibliophagist
Posts: 40,573
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
06-25-2020, 01:18 AM | #4 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It might be possible by defining a column built from other columns that strips the html using a template function and then using that column in the cover generator. I dont recall if the cover generator has direct support for template functions, if so you can skip the creation of the extra column.
|
06-25-2020, 12:25 PM | #5 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2020
Device: Windows 10 PC: Calibre
|
Quote:
|
|
Advert | |
|
06-25-2020, 01:05 PM | #6 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2020
Device: Windows 10 PC: Calibre
|
Never mind- I figured out how to do it by setting up a custom column using the function {comments:substr(9,-10)} and setting that column as the source for the subtitle text in the cover generator.
Thanks for the help! |
06-26-2020, 07:44 AM | #7 | |
Connoisseur
Posts: 94
Karma: 12
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
|
Quote:
Edit. Oh, you are talking about a plugin, no original Calibre, aren't you? Last edited by Carmelocotonto; 06-26-2020 at 08:23 AM. |
|
06-26-2020, 12:02 PM | #8 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2020
Device: Windows 10 PC: Calibre
|
Quote:
To customize the cover generation, right-click on the "generate cover" button and click on the "customize" option that will pop up. There will be four tabs to choose from in this window, and the last tab, "text," will allow you to set templates for the title, subtitle, and footer. |
|
06-26-2020, 06:46 PM | #9 | |
Connoisseur
Posts: 94
Karma: 12
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
|
Quote:
|
|
06-26-2020, 08:47 PM | #10 |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
06-19-2024, 10:20 AM | #11 | |
Junior Member
Posts: 1
Karma: 10
Join Date: Jun 2024
Device: Kobo Clara 2
|
Registered just to post this solution.
Jabbergeist's solution works, but it has changed a little bit due to the way calibre has also. A working solution for Calibre 7.xx that works in the FOOTER TEMPLATE is: Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Caliber Book Cover generation problem | Honeychem | Conversion | 2 | 08-06-2015 12:03 PM |
Comments in the Cover Browser? | Plaquard | Calibre | 8 | 05-27-2015 10:00 PM |
Cover comments please? | BeccaPrice | Writers' Corner | 79 | 06-28-2013 09:19 AM |
Cover generation, selecting image, from CLI | richieadler | Plugins | 3 | 11-04-2012 12:32 AM |
Ended Kindle 2nd Generation (Nearly New) + Cover | a.anonymous | Flea Market | 3 | 11-11-2010 07:15 PM |