![]() |
#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? |
![]() |
![]() |
![]() |
#2 |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, 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. |
![]() |
![]() |
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
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. |
|
![]() |
![]() |
![]() |
#4 |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, 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. |
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#6 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,056
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
|
![]() |
![]() |
![]() |
#7 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,064
Karma: 60358908
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 |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
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. |
|
![]() |
![]() |
![]() |
#9 |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, 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 ![]() |
![]() |
![]() |
![]() |
#10 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,056
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
|
![]() |
![]() |
![]() |
#11 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,263
Karma: 168983734
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.
|
![]() |
![]() |
![]() |
#12 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,056
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |