Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-17-2024, 11:24 AM   #181
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,281
Karma: 72663495
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
This did it:

Code:
#purchasesource:true AND (date:>=2013 AND date:<=2019)
ownedbycats is online now   Reply With Quote
Old 12-06-2024, 02:00 AM   #182
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,281
Karma: 72663495
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
What's the best way to find items in a custom column that end with a period? I have a template that can produce these if I forgot to fill out another column first.
ownedbycats is online now   Reply With Quote
Old 12-06-2024, 06:41 AM   #183
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,265
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
What's the best way to find items in a custom column that end with a period? I have a template that can produce these if I forgot to fill out another column first.
Is it a tags-like column? If so, this search template will be the fastest way. Set 'field' to your column lookup key. This will work for non-tags-like, but in that case it won't be much faster than a GPM template.

Code:
python:
def evaluate(book, context):
	field = '#genre'

	items = book.get(field, [])
	if not isinstance(items, (list, tuple, set)):
		items = (items, )
	for t in items:
		if t.endswith('.'):
			return '1'
	return ''

Last edited by chaley; 12-07-2024 at 08:54 AM.
chaley is offline   Reply With Quote
Old 12-06-2024, 05:38 PM   #184
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,281
Karma: 72663495
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thank you!
ownedbycats is online now   Reply With Quote
Old 12-09-2024, 01:19 AM   #185
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,281
Karma: 72663495
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
In my series:true VL, what would be the lowest-impact way to exclude series with only one book?
ownedbycats is online now   Reply With Quote
Old 12-09-2024, 06:25 AM   #186
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,265
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
In my series:true VL, what would be the lowest-impact way to exclude series with only one book?
This template search should be fast enough to use in a VL. You probably want to make it a stored template.
Code:
python:
def evaluate(book, context):
	# Return True ('yes') if the value in 'field' is used by more than 'test_count' books.
	# This template only works with single value fields such as Series, Publisher, and enumerations
	field = 'series'
	test_count = 1

	db = context.db.new_api
	id_map = context.globals.get('id_map')
	if id_map is None:
		context.globals['id_map'] = id_map = db.get_item_name_map(field)
		context.globals['item_book_count'] = db.get_usage_count_by_id(field)
	item_book_count = context.globals['item_book_count']

	item_id = id_map.get(book.get(field))
	if item_id is None or item_book_count.get(item_id, 0) <= test_count:
		return ''
	return 'yes'
chaley is offline   Reply With Quote
Old 12-09-2024, 04:21 PM   #187
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,281
Karma: 72663495
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
That worked! I saved it as series_multibook().
ownedbycats is online now   Reply With Quote
Old 12-17-2024, 02:34 PM   #188
correoparaappzz
Connoisseur
correoparaappzz began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Nov 2023
Device: Kindle Oasis
Exclamation author_sort



hi, is there a way to change author_sort from 'Last Name, First Name' to 'First Name Last Name' without doing it one by one in Manage authors
correoparaappzz is offline   Reply With Quote
Old 12-17-2024, 02:49 PM   #189
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,543
Karma: 9250680
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by correoparaappzz View Post


hi, is there a way to change author_sort from 'Last Name, First Name' to 'First Name Last Name' without doing it one by one in Manage authors
Probably need to explain why you would want to do that. There might be another way to get the results you are after.

Check out Preferences>Tweaks>Author sort name algorithm
Karellen is offline   Reply With Quote
Old 12-17-2024, 03:43 PM   #190
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: 30,755
Karma: 59473090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quality check Plugin can identify and fix 2 common Author name issues
1)Initials format. 2 )Name order (Fn Ln or Ln, Fn)
Step 0 is to configure the PI with your preferences (author Initial format)
Step 1 is to run Check Metadata: the author with or without commas (what is the wrong way for you): Select All results: Fix:...
Step 2 is to do the same check, except for Initials. And the Fix: Initials

The only fix that this can't find or do is when it is a Joe and Jane Smith type. You need to hand edit to Joe Smith&Jane Smith. If you do this in rename in the Tag Browse , it does all uses
theducks is online now   Reply With Quote
Old 12-17-2024, 04:21 PM   #191
correoparaappzz
Connoisseur
correoparaappzz began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Nov 2023
Device: Kindle Oasis
Quote:
Originally Posted by Karellen View Post
Probably need to explain why you would want to do that. There might be another way to get the results you are after.

Check out Preferences>Tweaks>Author sort name algorithm
correoparaappzz is offline   Reply With Quote
Old 02-09-2025, 11:25 AM   #192
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,281
Karma: 72663495
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Is there better way to do this search? Want to find books that have tags only in subjects.

Code:
(NOT tags:"=.Comics" 
AND NOT tags:"=.Documentations & Manuals" 
AND NOT tags:"=.Fanfiction" 
AND NOT tags:"=.Fiction" 
AND NOT tags:"=.Magazines & Publications" 
AND NOT tags:"=.Nonfiction") 

AND tags:"=.Subjects"

Last edited by ownedbycats; 02-09-2025 at 11:28 AM.
ownedbycats is online now   Reply With Quote
Old 02-09-2025, 12:16 PM   #193
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,115
Karma: 78857258
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Not being a templats language expert, I'd think that using list_intersection might be an idea; something along the lines of list_intersection(tags, <list of comics, fanfiction, etc>

If the list_intersection is null and tags = subjects
PeterT is offline   Reply With Quote
Old 02-10-2025, 04:02 PM   #194
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,265
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by PeterT View Post
Not being a templats language expert, I'd think that using list_intersection might be an idea; something along the lines of list_intersection(tags, <list of comics, fanfiction, etc>

If the list_intersection is null and tags = subjects
List_intersection was the first thing I thought of, but given that the OP is using the "=." form of the search, it won't work well because it checks the entire value.

Using in_list might be better than a series of and conditions. It depends on how common the tests are, because search does shortcutting. By in_list I mean something like this:
Code:
program:
	if ! ("\.Comics$|\.Documentations & Manuals$|\.Fanfiction$|\.Fiction$|\.Magazines & Publications$|\.Magazines & Publications$" inlist $tags) && "\.Subjects$" inlist $tags then
		'whatever'
	fi
However, what you have isn't bad because of shortcutting, is easy to read, and easy to change, so I probably wouldn't mess with it.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Templates: various questions not worth their own thread ownedbycats Library Management 817 Yesterday 12:29 PM
Forma Questions about quick management of Collections. droopy Kobo Reader 5 10-10-2019 11:34 PM
2 questions; library management & calibre version Blue2u Library Management 4 04-15-2018 07:53 PM
eBook/Comic/Manga Library Management Workflow: How do you manage your library? Inukami Library Management 16 08-02-2017 12:24 PM
Thread management questions meme Feedback 6 01-31-2011 05:07 PM


All times are GMT -4. The time now is 10:30 PM.


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