A valiant effort.
Looks fairly decent, but I prefer
general program mode (very flexible if you know what you are doing) so I reimplemented it entirely from scratch -- why keep extra custom columns around if they can be consolidated in one? Besides, every custom
template column slows down the database as it is built and rebuilt dynamically.
Save to Disk template:
Code:
program:
# Define the series and series index, using readorder if possible.
# Fallback on "Novels".
series = first_non_empty(
field('#readorder'),
series_sort(),
'Novels'
);
sidx = ifempty(
finish_formatting(field('#readorder_index'), '0>3s', '[', '] '),
finish_formatting(field('series_index'), '0>2s', '', ' - ')
);
author = strcat(
substr(field('author_sort'), 0, 1), '/',
field('author_sort'), '/'
);
final_result = strcat(
# If readorder does *not* exist, prepend author info.
test(
field('#readorder'),
'',
author
),
series, '/', sidx, field('title')
);