![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2022
Device: none
|
How to search for only the first occurence in a series?
Hello everyone. Thank you for this wonderful program, I want to make a nice digital library with it. I need just one more thing to fully customize my "shelf". I want the program to display only the first available book in any series.
So far I've been using the search query: Code:
not series_index:>1 Can somebody more experienced or intelligent give me the code I need? Happy reading everyone. |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71
Karma: 2202292
Join Date: Nov 2018
Device: Kobo Libra 2
|
Hi there, I have a custom column which essentially does what you're asking - it's True if the book is either standalone or first in series (even if the series index doesn't begin at 1) and False otherwise. I find it useful to have this info in a column (called #first_in_series) so I can search very easily (either #first_in_series:=True or False). Here are the steps:
1. Preferences - Advanced - Tweaks - set "allow_template_database_functions_in_composit es = True" 2. Add column - column built from other columns (see attached pic) 3. Copy this code into the column template: Code:
program: # Returns True if it is the first book in a series (or a standalone book with no series), including cases where the series index does not begin at 1. # Returns False otherwise first_in_series = 'True'; if field('series') then this_series = field('series'); this_series_index = field('series_index'); books_in_series = book_values('title', 'series:="' & this_series & '"', ',', 0); lowest_series_num = 999; for title in books_in_series: title_index = book_values('series_index', 'title:="' & title & '"', ',', 0); if title_index < lowest_series_num then lowest_series_num = title_index fi rof; if lowest_series_num !=# this_series_index then first_in_series = 'False' fi fi; output = first_in_series |
![]() |
![]() |
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#4 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71
Karma: 2202292
Join Date: Nov 2018
Device: Kobo Libra 2
|
Quote:
I just really like custom columns ![]() |
|
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2022
Device: none
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
You might be able to do it with the action chains plugin, doing a search similar to what is in this thread then setting a tag or a yes/no column for the books it finds. Ask in its thread in the plugins forum. I don't know if the plugin still supports calibre 5.44. Last edited by chaley; 10-06-2022 at 11:00 AM. Reason: Typo |
|
![]() |
![]() |
![]() |
#7 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,033
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Anyone stuck on 32 bit Linux (e.g. Mint 19.3 32bit is still supported) or 32 bit Win10 due to CPU type is also limited to Calibre 5.44. Still it's better than XP or Win7.
|
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
This articel will tell you what you need to know. https://www.laptopmag.com/articles/h...ade-windows-10 Last edited by JSWolf; 10-05-2022 at 04:52 PM. |
|
![]() |
![]() |
![]() |
#9 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
oh for god's sake
|
![]() |
![]() |
![]() |
#10 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 110
Karma: 1133068
Join Date: Sep 2007
Device: ipaq
|
|
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#12 | ||
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2022
Device: none
|
Quote:
![]() I also found a simple workaround for the time being. I mark books manually, with a custom value. Quote:
![]() Spoiler:
|
||
![]() |
![]() |
![]() |
#13 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2022
Device: none
|
The solution for Calibre 5.44 – Action Chains Plugin
The solution for later versions – above in this thread, by courtesy of allanahk. Thanks for help, everyone ![]() ![]() |
![]() |
![]() |
![]() |
#14 | |
Deviser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
Addendum to your question
Quote:
DaltonST |
|
![]() |
![]() |
![]() |
#15 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
|
IMO, seven was the last acceptable Windows OS </rant> |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there a way to search tags and series? | JJ Johnson | Calibre | 3 | 10-26-2020 01:57 AM |
Search series and tags | DirCat | Library Management | 7 | 10-02-2019 04:13 PM |
Search And Replace using Series value? | Robmonster | Calibre | 7 | 11-15-2011 10:59 AM |
search series number | Stampercam | Calibre | 2 | 05-30-2011 02:53 AM |
search for series number | speakingtohe | Calibre | 4 | 08-29-2010 01:21 PM |