Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 09-10-2022, 10:41 AM   #1
01100001
Enthusiast
01100001 began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Sep 2022
Device: Microsoft Surface Pro 7, Apple iPad
Question Book list template doesn't interpret custom 'Long text' fields?

Here's how I defined one of my custom colums:
  • Lookup name: edition
  • Column heading: Edition
  • Column type: Long text, like Comments, not shown in the Tag browser
  • Column heading: Show heading to the side of the text
  • Interpret this column as: Short text, like a title

That, I feel, is the apt way to define a short-text custom column whose values I didn't want Calibre to see as tags/terms.

Now this is what my Book list template looks like:

Code:
<b>{title}</b>
<b>By</b> {authors}
<b>{#countries}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{#edition}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<span style="color:green;">{#origin}</span>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{#formats}
<b>File(s):</b> {#filenames}
(I used custom spacing because I didn't want the spread-to-full-width invisible table that ||| provides. It's hard to parse at a glance when they are so far apart.)

Questions
  1. {#edition} isn't interpreted in the template and the output for the field therefore is blank. I am assuming this is because the Column type is set to Long text?

    I do not intend to change the column type, so is there a workaround? (Or, am I missing something here?)
  2. Calibre template language doesn't work and therefore cannot be used in the Book list template? For e.g., {#origin:contains(Ebook,⭐️,)} shows nothing, likely because it isn't being interpreted. (It works in the custom column's Template field.) Is there a way I can achieve what I want?
01100001 is offline   Reply With Quote
Old 09-10-2022, 07:24 PM   #2
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,651
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I put an icon with no text on long text columns that are set, if Comments are set I put an icon with text on Title.

OOPS - I just realised you're presumably referring to the server.

BR

Last edited by BetterRed; 09-10-2022 at 07:28 PM.
BetterRed is offline   Reply With Quote
Advert
Old 09-10-2022, 10:37 PM   #3
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,971
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, long text columns are not displayed as they are of unbounded length and dont really fit. The template language is not going to work as it would need to be fully re-implemented in javascript which is way too much work.
kovidgoyal is offline   Reply With Quote
Old 09-11-2022, 05:25 AM   #4
01100001
Enthusiast
01100001 began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Sep 2022
Device: Microsoft Surface Pro 7, Apple iPad
Ah, some day then. Thank you for confirming.
01100001 is offline   Reply With Quote
Old 09-11-2022, 05:59 AM   #5
01100001
Enthusiast
01100001 began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Sep 2022
Device: Microsoft Surface Pro 7, Apple iPad
Quote:
Originally Posted by kovidgoyal View Post
Yes, long text columns are not displayed as they are of unbounded length and dont really fit. [...]
(Addendum)

Although, come to think of it, even if the column type is Long text, like Comments, not shown in the Tag browser, the sub-type selected is Short text, like a title, to which, your reason doesn't apply?
01100001 is offline   Reply With Quote
Advert
Old 09-11-2022, 10:59 AM   #6
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,971
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
well possibly, but its not that important for me to implement, patches welcome. It should be a fairly simple patch to render_field() in custom_list.pyj
kovidgoyal is offline   Reply With Quote
Old 09-11-2022, 11:07 AM   #7
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,971
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
well i had 5 mins so: https://github.com/kovidgoyal/calibr...50a29d0e23033a


havent really rested it.
kovidgoyal is offline   Reply With Quote
Old 09-12-2022, 07:03 AM   #8
01100001
Enthusiast
01100001 began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Sep 2022
Device: Microsoft Surface Pro 7, Apple iPad
Brilliant, thank you!

I assume this fix will automatically become available in the next update?
01100001 is offline   Reply With Quote
Reply

Tags
book list template, calibre, calibre 6.4, calibre content server, custom columns


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom list template Laval Related Tools 6 10-11-2022 09:13 AM
Long text fields are too tall Horus68 Library Management 3 12-10-2019 06:24 PM
Calibre-server doesn't honor custom book list settings? Phssthpok Related Tools 4 12-28-2017 04:33 AM
Custom column long text toolbar MerlinMama Calibre 2 03-01-2017 01:14 PM
request: Column heading name for long text fields At_Libitum Calibre 3 11-03-2013 01:56 AM


All times are GMT -4. The time now is 09:40 PM.


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