Quote:
Originally Posted by JimmXinu
I didn't really think about it before, but if it were me doing this, I'd probably implement it with a Calibre 'built from other columns' custom column that is just a display for the existing exact word count column.
|
I use this for displaying floating-point purchase cost in the tag browser. It can be easily changed to use integer wordcount.
EDIT: Note
switch_if is a relatively new function, two or three versions ago. If you're using an older version may not be present.
Code:
program:
switch_if(
$$#purchasecost == 'none', '',
$$#purchasecost ==# '00.00', '$0.00',
$$#purchasecost <=# '00.99', '$0.01 - $0.99',
$$#purchasecost <=# '04.99', '$1.00 - $4.99',
$$#purchasecost <=# '10.00', '$5.00 - $9.99',
$$#purchasecost <=# '15.00', '$10.00 - $14.99',
$$#purchasecost <=# '15.00', '$10.00 - $14.99',
$$#purchasecost <=# '20.00', '$15.00 - $19.99',
$$#purchasecost <=# '30.00', '$20.00 - $29.99',
'$30.00 and up'
)