Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-01-2022, 07:51 AM   #1
Fynjisx
Connoisseur
Fynjisx began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
find authors with more than one book in the library

how to write a search query to display those authors who have three or more books in the library?
Fynjisx is offline   Reply With Quote
Old 08-01-2022, 09:38 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You do know that the number next to the authors name in the Tag browser is how many entries in the Library

I highlighted entries, because that will include 'empty books'.
If you want that to only reflect those with formats, the search formats:true just before looking
theducks is offline   Reply With Quote
Advert
Old 08-01-2022, 11:33 AM   #3
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: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
You can do this with a template search. Open the advanced search dialog, choose the template search tab, then enter this as the template:
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) >=# 3 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 search type is number and the search value is 1.
chaley is offline   Reply With Quote
Old 08-02-2022, 08:01 PM   #4
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 893
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
Can these searches be saved?
dunhill is offline   Reply With Quote
Old 08-02-2022, 08:49 PM   #5
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: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dunhill View Post
Can these searches be saved?
yes they can.

You can also save the template and reference that in a search.
chaley is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Library - Finding authors with only one book Georgie W Library Management 3 07-09-2022 08:51 AM
How to find authors error syntaxe Doum Library Management 5 07-14-2020 04:14 PM
Can't find book in Kobo library BarryMarshall Workshop 0 04-06-2012 01:16 PM
Kindle free book: Know the Past, Find the Future: The New York Public Library at 100 greencat Deals and Resources (No Self-Promotion or Affiliate Links) 0 05-19-2011 11:10 AM
How do you find new authors to read? jbcohen Reading Recommendations 46 01-30-2011 04:03 PM


All times are GMT -4. The time now is 07:37 AM.


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