View Single Post
Old 10-22-2022, 07:49 AM   #10
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
Assuming you use a composite column (column built from other columns) that behaves like tags, they are clickable without using the PI. Are you seeing something different?
I had tried both composite column types (behaves like tags and the other) before using the PI, neither would linkify; i'm running from the latest source, so maybe something changed? Or maybe I've been bedtime procrastinating too long and missed something, most probably.

Quote:
And for more fun, here is the template using python template mode (PTM), which will be much faster than the GPM template above:
Code:
python:
def evaluate(book, ctx):
	db = ctx.db.new_api
	return ('<br>'.join(
		[f'<a href="calibre://search/_?encoded_virtual_library={vl.encode().hex()}">{vl}</a>' 
		 for vl in db.virtual_libraries_for_books((book.id,))[book.id]
		]))
Indeed, this works instantly, thank you so much!
The PI approach is also interesting, so I'll keep using it together with the new switching links (I think I like to see the search bar populated, which doesn't happen when the VLs are active)



edit: added screencap
Attached Thumbnails
Click image for larger version

Name:	MWSnap0891 2022-10-22, 08_58_03.png
Views:	55
Size:	19.7 KB
ID:	197305  

Last edited by Comfy.n; 10-22-2022 at 07:59 AM.
Comfy.n is offline   Reply With Quote