Quote:
Originally Posted by Katja_hbg
Nice.
I added it yesterday and it works immediately.
But ... in some cases I buy books not in right order
e.g. I own series part #1 #3 #5
For book 3 the tooltip shows: book 3 of 3.
Could you please expand the example to show:
book 3 of 5 (some are missing) or
book 3 of 3 (highest number of the serie is 5)
|
Here is a template that does more than you asked. Change it as you wish.
Code:
program:
def format(i):
ii = floor(i);
return if ii ==# i then ii else i fi
fed;
if $series then
series_book_count = book_count('series:"""=' & $series & '"""', 0);
indices = book_values('series_index', 'series:"""=' & $series & '"""', ',', 0);
max_index = -999;
min_index = 999999999999999;
for i in indices:
if i ># max_index then
max_index = format(i)
fi;
if i <# min_index then
min_index = format(i)
fi
rof;
return f_string("Series: {$series}<br>" &
"Series index: {$series_index}<br>" &
"Lowest series index: {min_index}<br>" &
"Highest series index: {max_index}<br>" &
"Books in series: {series_book_count} ")
fi;
return 'This book is not in a series'