View Single Post
Old 07-19-2024, 01:34 AM   #831
irrationalpie
Junior Member
irrationalpie began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2019
Device: Kindle PW3
Quote:
Originally Posted by nevermiffed View Post
I just finished getting all my fanfic onto Calibre, and I am trying to get the summary onto the cover of the books. I have the generate cover plugin and while I can have the summary on the cover, it has a lot of HTML with it. How can I make it, well, not have that?

I was trying to make a custom column for summary/comments that would edit those out, but I have no clue what I'm doing here.

I was mostly using these posts as a guide

https://www.mobileread.com/forums/sh...d.php?t=331027
https://www.mobileread.com/forums/sh....php?p=4143924
I've done this exact thing! With some extra weirdness to try to have the summary truncate gracefully if it's too long by adding "(...)" after a period or comma or such. I added a "max" column (this holds a number that can override the default summary truncation length) and I added a "summary" column and defined a formula to generate it from the "comments" and "max" column. The formula is hideous because I couldn't use loops, I've got the text here you can copy (see gdocs link below). The way the max column works is that by default the summary gets truncated sometime before it gets to 201 characters--you can change this default near the beginning of the script if that doesn't work well for your covers! And for a particular cover, if it needs to be truncated sooner (say the summary has a bunch of dialogue so it's not very long but it's in a bunch of paragraphs) you can just mess with the max column, trying numbers higher or lower than 201 until that particular summary looks the way you want it! I'm not sure how coherent this explanation is, but I'll try to monitor this thread in case you decide to try this out and have follow-up questions

https://docs.google.com/document/d/1...t?usp=drivesdk
irrationalpie is offline   Reply With Quote