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 03-09-2024, 03:27 AM   #1
Crisis
Junior Member
Crisis began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2021
Device: none
Show only first book in a series ?

Hello !

I have a lot of comics and I would like a display with only the first volume of each series.
Maybe... Can be added a label browser visualization with this function :

"only the first volume of a series"

What do you think of this idea?
Crisis is offline   Reply With Quote
Old 03-09-2024, 05:20 AM   #2
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
This comes to mind in the GUI search field:
Code:
template:"""{series_index}#@#:n:1"""

Last edited by DrChiper; 03-09-2024 at 05:26 AM.
DrChiper is offline   Reply With Quote
Old 03-09-2024, 06:07 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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DrChiper View Post
This comes to mind in the GUI search field:
Code:
template:"""{series_index}#@#:n:1"""
FWIW: this does the same thing using standard calibre search syntax.
Code:
series:true and series_index:=1
It is possible that the first book in the series doesn't have index 1. This template search finds the lowest index in each series.
Code:
template:"""program:
	vals = globals(vals='');
	if !vals then
		all_series = book_values('series', 'series:true', ',', 0);
		for series in all_series:
			indices = book_values('series_index', 'series:="' & series & '"', ',', 0);
			first = 1;
			lowest = 9999999;
			for index in indices:
				if first || index <# lowest then lowest = index; first = '' fi
			rof;
			vals = list_union(vals, series & ':' & lowest, ',')
		rof;
		set_globals(vals)
	fi;
	if $series && $series_index ==# select(vals, $series) then '1' fi#@#:b:yes"""
If you use the Advanced search dialog, the template is this:
Code:
program:
	vals = globals(vals='');
	if !vals then
		all_series = book_values('series', 'series:true', ',', 0);
		for series in all_series:
			indices = book_values('series_index', 'series:="' & series & '"', ',', 0);
			first = 1;
			lowest = 9999999;
			for index in indices:
				if first || index <# lowest then lowest = index; first = '' fi
			rof;
			vals = list_union(vals, series & ':' & lowest, ',')
		rof;
		set_globals(vals)
	fi;
	if $series && $series_index ==# select(vals, $series) then '1' fi
The template search dialog is this:
Click image for larger version

Name:	Clipboard01.jpg
Views:	23
Size:	71.0 KB
ID:	206787

EDIT: if you store the above as a saved search then you can create a virtual library showing the lowest book.

Last edited by chaley; 03-09-2024 at 06:13 AM.
chaley is offline   Reply With Quote
Old 03-09-2024, 06:25 AM   #4
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
I knew you would come up with a cleverer solution

And indeed, series could have not an index of 1. My improvement would be (I like to keep code small):
Code:
series:true and series_index:"<=1"
This will find 0, 0.n and 1.

I have the impression
Code:
template:"""{series_index}#@#:n:<=1"""
is quicker, though (1 comparison less)

Last edited by DrChiper; 03-09-2024 at 08:17 AM.
DrChiper is offline   Reply With Quote
Old 03-09-2024, 06:34 AM   #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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DrChiper View Post
I knew you would come up with a cleverer solution

And indeed, series could have not an index of 1. My improvement would be (I like to keep code small):
Code:
series:true and series_index:"<=1"
This will find 0, 0.n and 1.
But what if the first book is missing? The series could start with the second book (index == 2).
chaley is offline   Reply With Quote
Old 03-09-2024, 07:16 AM   #6
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,166
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by chaley View Post
But what if the first book is missing? The series could start with the second book (index == 2).
Indeed due to special offers you might have only 14 and 20.
Quoth is offline   Reply With Quote
Old 03-09-2024, 07:22 AM   #7
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: 29,812
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I just checked my saved searches:
I have the simple one: (index-1)
And
I also found
a LAST in series (seriously looks like chaley's work )
The reason you want formats:true is because some of us use Empty books as a wishlist
theducks is online now   Reply With Quote
Old 03-09-2024, 07:29 AM   #8
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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by theducks View Post
I also found a LAST in series (seriously looks like chaley's work )
Yes. That is one of the template searches I put in the Plugboard, template, and custom composite column recipes thread. I just added the one from this thread as well, Search for books with lowest series index.

Also, the template in this thread exposed a bug in the book_values() function. It ignores values of zero. This will be fixed in the next release/preview.

Last edited by chaley; 03-09-2024 at 08:37 AM.
chaley is offline   Reply With Quote
Old 03-09-2024, 08:14 AM   #9
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
Gentlemen, you are all so right
I can even add another possibility: some of my series are numbered following the preferred reading order, so series book #1 can be easily be published book #98 ... There you go.

Let's blame it on the insufficient specs from the OP which render our solutions moot at this point. As I stated before on this forum: assumptions are deadly.

On the positive side: a bug seems to be fetched and fixed due to the topic Not bad for a few minutes of our involvement.
DrChiper is offline   Reply With Quote
Old 03-09-2024, 02:38 PM   #10
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,166
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by theducks View Post
The reason you want formats:true is because some of us use Empty books as a wishlist
Especially, or maybe only, when it's a series. PD or bought.
Quoth is offline   Reply With Quote
Old 03-09-2024, 05:32 PM   #11
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,489
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Another special case is where I would want the first book in a series but there are one or more prequels which I would use series indexes such as 0.25, 0.50, 0.75 for.
DNSB is offline   Reply With Quote
Old 03-10-2024, 07:59 AM   #12
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,166
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by DNSB View Post
Another special case is where I would want the first book in a series but there are one or more prequels which I would use series indexes such as 0.25, 0.50, 0.75 for.
I do that too.
Quoth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show book series number on main book list drwolff Kobo Reader 2 08-15-2020 11:24 PM
search to show only lowest book in each series YaronD Library Management 3 08-06-2019 05:45 PM
show all book in a series where one book is XXXX redtwotwo Library Management 11 03-12-2018 12:35 PM
Show series number but not if they aren't in a series? M4cc45 Library Management 10 09-03-2011 07:35 PM
Any way to show book number in series ? alophind Sony Reader 7 11-25-2010 11:25 AM


All times are GMT -4. The time now is 11:18 PM.


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