|  11-17-2024, 11:24 AM | #181 | 
| Custom User Title            Posts: 11,352 Karma: 79528341 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) | 
|   |   | 
|  12-06-2024, 02:00 AM | #182 | 
| Custom User Title            Posts: 11,352 Karma: 79528341 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.
		 | 
|   |   | 
|  12-06-2024, 06:41 AM | #183 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 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. | |
|   |   | 
|  12-06-2024, 05:38 PM | #184 | 
| Custom User Title            Posts: 11,352 Karma: 79528341 Join Date: Oct 2018 Location: Canada Device: Kobo Libra H2O, formerly Aura HD | 
			
			Thank you!
		 | 
|   |   | 
|  12-09-2024, 01:19 AM | #185 | 
| Custom User Title            Posts: 11,352 Karma: 79528341 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?
		 | 
|   |   | 
|  12-09-2024, 06:25 AM | #186 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 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' | |
|   |   | 
|  12-09-2024, 04:21 PM | #187 | 
| Custom User Title            Posts: 11,352 Karma: 79528341 Join Date: Oct 2018 Location: Canada Device: Kobo Libra H2O, formerly Aura HD | 
			
			That worked! I saved it as series_multibook().
		 | 
|   |   | 
|  12-17-2024, 02:34 PM | #188 | 
| Connoisseur  Posts: 66 Karma: 10 Join Date: Nov 2023 Device: Kindle Oasis |  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 | 
|   |   | 
|  12-17-2024, 02:49 PM | #189 | |
| Wizard            Posts: 1,687 Karma: 9500498 Join Date: Sep 2021 Location: Australia Device: Kobo Libra 2 | Quote: 
 Check out Preferences>Tweaks>Author sort name algorithm | |
|   |   | 
|  12-17-2024, 03:43 PM | #190 | 
| Well trained by Cats            Posts: 31,250 Karma: 61360164 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 | 
|   |   | 
|  12-17-2024, 04:21 PM | #191 | 
| Connoisseur  Posts: 66 Karma: 10 Join Date: Nov 2023 Device: Kindle Oasis | |
|   |   | 
|  02-09-2025, 11:25 AM | #192 | 
| Custom User Title            Posts: 11,352 Karma: 79528341 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. | 
|   |   | 
|  02-09-2025, 12:16 PM | #193 | 
| Grand Sorcerer            Posts: 13,693 Karma: 79983758 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 | 
|   |   | 
|  02-10-2025, 04:02 PM | #194 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 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 | |
|   |   | 
|  03-22-2025, 10:16 PM | #195 | 
| Reader of Books            Posts: 249 Karma: 178096 Join Date: Oct 2012 Device: Kobo Libra Colour, Clara Colour, Libra 2, Elipsa | 
			
			Is there a way to create a tag from two different tags that will stay updated? i.e., I have "Horror & Ghost Stories" and "Science Fiction" I want "Horror/Science Fiction" to be the tag for the intersection of both genres. I know I can do this manually via searching and tagging, but it'd be nicer if there was an automatic way of doing it | 
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Templates: various questions not worth their own thread | ownedbycats | Library Management | 861 | 09-04-2025 11:11 AM | 
| 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 |