Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-09-2022, 06:39 AM   #1
Georgie W
Connoisseur
Georgie W began at the beginning.
 
Georgie W's Avatar
 
Posts: 96
Karma: 10
Join Date: Jan 2014
Location: Scotland
Device: KT4 5.13.6
Virtual Library - Finding authors with only one book

From my Calibre Total Library, I have created a smaller virtual library ("My Kindle") which shows all the books actually loaded on my kindle (yes, OK, obv!) - about 3,000 books. In Calibre, I have created collections for each author (with some individual tweaks) and I use the Kindle Collections add-in to replicate these on my kindle.

What I want to do is to search on Calibre for where an author has only one book in the virtual library. E.g. there are 20 books in my Total Library "Agatha Christie" collection, but only one of them is in My Kindle virtual library. So on my kindle, I'm displaying a collection ("Agatha Christie") with only one book in it.

I have looked at the ABC add-in, which will give me the number of books by each author, but only as relates to my Total Library. It can't be tweaked to report just on my virtual library.

Grateful for any suggestions.
Georgie W is offline   Reply With Quote
Old 07-09-2022, 07:04 AM   #2
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,971
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
In 5.x, this would be difficult, though you can sort categories by 'number of books' in the tag browser.

Running Calibre from source (currently it's on the 6 beta) added a template function that may help. See these for more info:
https://www.mobileread.com/forums/sh...d.php?t=347693
https://www.mobileread.com/forums/sh...5&postcount=83

Last edited by ownedbycats; 07-09-2022 at 07:07 AM.
ownedbycats is online now   Reply With Quote
Advert
Old 07-09-2022, 08:02 AM   #3
Georgie W
Connoisseur
Georgie W began at the beginning.
 
Georgie W's Avatar
 
Posts: 96
Karma: 10
Join Date: Jan 2014
Location: Scotland
Device: KT4 5.13.6
Thanks - the second template example looks interesting, and I'll wait for 6.x to be available.
Georgie W is offline   Reply With Quote
Old 07-09-2022, 08:51 AM   #4
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
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"
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Libraries - Using Multiple searches to make one virtual library tlwright Library Management 3 07-23-2020 06:29 PM
Refreshing book list for virtual library? pwinn Library Management 3 09-18-2017 10:33 PM
Updating a virtual library by adding more authors Larla Library Management 3 07-02-2016 11:25 PM
Book detaisl in empty virtual library richreads Calibre 3 09-18-2013 12:56 PM
Virtual Library: NOT selecting based on 1st character of authors first name ronbijen Library Management 1 07-17-2013 07:17 AM


All times are GMT -4. The time now is 05:09 PM.


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