View Single Post
Old 04-29-2020, 10:49 PM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@ToBiku: You could use the following to get just whatever is in the title before the colon:

Code:
{title:sublist(0,1,:)}
But, I tend to agree with the others. Looking at my library, anything with a colon in the title would be meaningless without what is after the colon. Or a duplicate title.

It also depends on why you are doing this. If your library has a lot of books like your example, where what is after the colon is more of a subtitle, then I would split it.

If the problem is that the file name length, you can look at the template function "shorten". With this you have a bit of control over how the title is shortened to fit. I think calibre is using this on the file names if the full path is going to exceed 254 characters (I think it's 254).
davidfor is offline   Reply With Quote