Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-22-2022, 06:27 PM   #16
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,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
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?

And just for fun I made a composite column that lets you switch VLs by clicking the links in book details. The GPM template is:
Code:
program:
	res = '';
	for vl in virtual_libraries():
		if res then res = res & '<br>' fi;
		res = res & '<a href="calibre://search/_?encoded_virtual_library=' & to_hex(vl) & '">' & vl & '</a>'
	rof;
	res
The column definition is:
Attachment 197304

What you see is:
Attachment 197303

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]
		]))
EDIT: corrections to the column setup and the python template
I don't know what I was expecting to happen when I left the 'show in tag browser' option enabled, lol.
Attached Thumbnails
Click image for larger version

Name:	2022-10-22 19_26_24-Window.png
Views:	44
Size:	1.9 KB
ID:	197316  
ownedbycats is offline   Reply With Quote
Old 10-22-2022, 07:10 PM   #17
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
I haven't done exhaustive tests but I think that the "Show as HTML" must be unchecked to get clickable links. I don't think "Show in Tag browser matters. Reasoning: the column doesn't contain HTML so it shouldn't be shown as if it does. Book details doesn't care if the column is in the tag browser.
You're right, if I check "Show as HTML" I get plain vanilla non-clickable text, which is 'sort of' counter-intuitive.

Many people assume all clickable text coloured blue involves HTTP links within HTML. Even though I know that's not the case, I prefer to give non HTTP links a different colour e.g. FILE:// links are beige, CALIBRE:// links are red, ONENOTE:// links are purple etc.

Maybe links in Book Details that do a search should be coloured something other than Blue.

BR

Last edited by BetterRed; 10-22-2022 at 08:49 PM. Reason: clarity (red)
BetterRed is offline   Reply With Quote
Advert
Old 10-22-2022, 07:12 PM   #18
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,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by BetterRed View Post
You're right, if I check "Show as HTML" I get plain vanilla non-clickable text, which is 'sort of' counter-intuitive.

Many people assume all clickable text coloured blue involves HTML. Even though I know that's not the case, I give non http links a different colour e.g. file:// links are beige, calibre:// links are red, onenote:// links are purple etc.

Maybe links in Book Details that do a search should be coloured something other than Blue.

BR
In theory, you could use the HTML itself to turn the links another colour. I haven't tested this though.
ownedbycats is offline   Reply With Quote
Old 10-22-2022, 07:44 PM   #19
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by ownedbycats View Post
In theory, you could use the HTML itself to turn the links another colour. I haven't tested this though.
That's what I do, but using the tools provided in Normal view - I never look at the generated HTML, it could just as well be Postscript, CHML, XML… etc.

BR

Last edited by BetterRed; 10-22-2022 at 07:53 PM. Reason: grammar
BetterRed is offline   Reply With Quote
Old 10-22-2022, 08:00 PM   #20
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,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Oops, I think I misunderstood your post
ownedbycats is offline   Reply With Quote
Advert
Old 10-22-2022, 09:13 PM   #21
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by ownedbycats View Post
Oops, I think I misunderstood your post
My fault, I should have been more explicit that my preference is to have different colours for different protocol link types - then I know what to expect when I click on them. I changed my post accordingly.

AFAIK: apart from long text columns, the only column where the type of 'protocol link' can vary is the Authors column, because of its Link field.

BR
BetterRed is offline   Reply With Quote
Old 10-22-2022, 09:26 PM   #22
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,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by BetterRed View Post
My fault, I should have been more explicit that my preference is to have different colours for different protocol link types - then I know what to expect when I click on them. I changed my post accordingly.

AFAIK: apart from long text columns, the only column where the type of 'protocol link' can vary is the Authors column, because of its Link field.

BR
I once requested an option to keep the in-Calibre search as default while still having the author link available via context menu -- I would've personally used that. Unfortunately it was rejected.
ownedbycats is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded metadata on export halloleo Library Management 2 01-10-2021 08:01 AM
importing odt; get metadata from text randoneur Conversion 2 03-13-2019 09:47 AM
pdf metadata export devils_add Library Management 4 05-09-2014 02:46 AM
Extra metadata import from ODT olig Development 50 08-02-2012 03:14 AM
Export just metadata? TheD0ct0r Calibre 3 12-11-2010 09:52 AM


All times are GMT -4. The time now is 08:57 AM.


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