03-09-2024, 03:27 AM | #1 |
Junior Member
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? |
03-09-2024, 05:20 AM | #2 |
Bookish
Posts: 918
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. |
Advert | |
|
03-09-2024, 06:07 AM | #3 | |
Grand Sorcerer
Posts: 11,787
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
series:true and series_index:=1 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""" 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 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. |
|
03-09-2024, 06:25 AM | #4 |
Bookish
Posts: 918
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" I have the impression Code:
template:"""{series_index}#@#:n:<=1""" Last edited by DrChiper; 03-09-2024 at 08:17 AM. |
03-09-2024, 06:34 AM | #5 |
Grand Sorcerer
Posts: 11,787
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
But what if the first book is missing? The series could start with the second book (index == 2).
|
Advert | |
|
03-09-2024, 07:16 AM | #6 |
the rook, bossing Never.
Posts: 11,657
Karma: 87654321
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
|
03-09-2024, 07:22 AM | #7 |
Well trained by Cats
Posts: 29,974
Karma: 56143930
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 |
03-09-2024, 07:29 AM | #8 | |
Grand Sorcerer
Posts: 11,787
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
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. |
|
03-09-2024, 08:14 AM | #9 |
Bookish
Posts: 918
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. |
03-09-2024, 02:38 PM | #10 |
the rook, bossing Never.
Posts: 11,657
Karma: 87654321
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
|
03-09-2024, 05:32 PM | #11 |
Bibliophagist
Posts: 36,751
Karma: 146617620
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, 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.
|
03-10-2024, 07:59 AM | #12 |
the rook, bossing Never.
Posts: 11,657
Karma: 87654321
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
|
|
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 |