The functions are in calibre 5.99.12 (the calibre 6 beta).
This stored template and template search do the job, assuming I understand you correctly.
Stored template: authors_only_one_book
Code:
program:
vals = globals(vals='');
if !vals then
all_authors = book_values('authors', 'authors:true', '&', 1);
for aut in all_authors separator '&':
if book_count('authors:="' & aut & '"', 1) == 1 then
vals = list_join('&', vals, '&', aut, '&')
fi
rof;
set_globals(vals)
fi;
res = '';
for aut in 'authors':
if str_in_list(vals, '&', aut, 1, '') then
res = 1;
break
fi
rof;
return res
The template search:
Code:
template:"program: authors_only_one_book()#@#:n:1"