Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-10-2023, 02:50 AM   #1
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
help with metadata plugboard syntax please

i am using a cribbed formula which adds series name to front of title, so on kindle or kobo the book will appear as series name - series number - title

that works but for some series,on the device the series name bit fills the whole line, obscuring the actual title ( esp on kobo where only short single lines are allowed ?

so whats the syntax please for adding a shortened version of the series name and what trim options are available - as I am not sure what will work best

i could just shrink all my series names in calibre but that is a long and tedious process, I'd prefer NOT to change those. but if i do, I could not see how to block change old series name 1 to n into new series name 1 to n without the numbering going awry
stumped is offline   Reply With Quote
Old 01-10-2023, 05:50 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by stumped View Post
i am using a cribbed formula which adds series name to front of title, so on kindle or kobo the book will appear as series name - series number - title

that works but for some series,on the device the series name bit fills the whole line, obscuring the actual title ( esp on kobo where only short single lines are allowed ?

so whats the syntax please for adding a shortened version of the series name and what trim options are available - as I am not sure what will work best

i could just shrink all my series names in calibre but that is a long and tedious process, I'd prefer NOT to change those. but if i do, I could not see how to block change old series name 1 to n into new series name 1 to n without the numbering going awry
There are two built-in functions for this, substr() and shorten(). You use substr() if you want a single slice out of the name, for example the first 10 characters. You use shorten() if you want more control, for example the first 8 characters and the last 4 characters separated by a '-'.

Examples in basic single-function mode:
  • {series:substr(0,10)} Gives the first 10 characters of the series name. If the name length is less than 10 it is returned unchanged.
  • {series:shorten(8,-,4)} -- gives the first 8 characters of the series name, a dash, then the last 4 characters of the name. If the length of the name is less than 13 (8 + 4 + 1) then it is returned unchanged.
chaley is offline   Reply With Quote
Old 01-10-2023, 06:21 AM   #3
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Exactly what I needed.
Thanks
stumped is offline   Reply With Quote
Old 01-10-2023, 05:00 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Out of curiosity, why would you add the series name to the title for a Kobo when your Kobo is capable of displaying/searching the series information?
DNSB is offline   Reply With Quote
Old 01-10-2023, 10:30 PM   #5
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Because sort by title results look better if books in series are clumped together. And I guess it partly because I am used to seeing it done that way on kindle or on tablet for moon reader.
Just personal preference.
And inserted on having 1st seven characters of the full name

Ii was wondering how to duplicate that in calibre, i.e. have an extra column which shows the short series name as a what do you call it in calibre - ..a derived or calculated column

Last edited by stumped; 01-10-2023 at 10:35 PM.
stumped is offline   Reply With Quote
Old 01-10-2023, 11:25 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by stumped View Post
Because sort by title results look better if books in series are clumped together. And I guess it partly because I am used to seeing it done that way on kindle or on tablet for moon reader.
Just personal preference.
And inserted on having 1st seven characters of the full name

Ii was wondering how to duplicate that in calibre, i.e. have an extra column which shows the short series name as a what do you call it in calibre - ..a derived or calculated column
Possibly create a column for the truncated series with the template set to:

Code:
{series:.7}_{series_index:}
See attached image for my quick and dirty test.
Attached Thumbnails
Click image for larger version

Name:	truncated_series_column.png
Views:	75
Size:	25.6 KB
ID:	198941  
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax for tweaking exclude fields from metadata copy pg111 Library Management 2 03-08-2020 12:02 AM
Custom Metadata syntax for Genre/subGenre ItsAllFuzzy Library Management 0 06-16-2018 04:23 AM
Help with plugboard syntax, please Ptarmigan Library Management 3 02-15-2012 05:44 AM
Metadata Plugboard IxiaAurea Calibre 1 11-05-2011 01:13 PM
Metadata Filename Syntax gandor62 Calibre 15 07-18-2010 03:46 AM


All times are GMT -4. The time now is 09:41 AM.


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