Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 03:49 AM   #1
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,184
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
Dedicated identifier custom column converted into link

Hi,

I want to have a dedicated column for the Goodreads identifier, in order to display it in Book Details.

I'm aware that {identifiers:select(goodreads)} can replicate the identifier in text form, however I wanted it to behave just like the default identifiers column, as it allows converting the identifiers into links.

The default identifiers column has a clickable Goodreads link, however at the moment I'd prefer to have a dedicated one that can display just the GR link.

I've tried...
Code:
goodreads:{identifiers:select(goodreads)}
...hoping for some magic to take place but it didn't happen.
Comfy.n is online now   Reply With Quote
Old Today, 06:10 AM   #2
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: 11,950
Karma: 7225107
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I'm not sure what you want to display. Do you want "Goodreads" or do you want "Goodreads:12345"?

Assuming you want to see "Goodreads:12345" as a link and that the text column has "Contains HTML" checked, this should work:
Code:
program:
	gr_id = select($identifiers, 'goodreads');
	if gr_id then
		gr_id = 'goodreads:' & gr_id;
		l = urls_from_identifiers(gr_id, '');
		l = re(l, '>goodreads<', '>' & capitalize(gr_id) & '<')
	else
		l = ''
	fi
If you don't want to see the actual ID then use this:
Code:
program:
	gr_id = select($identifiers, 'goodreads');
	urls_from_identifiers('goodreads:' & gr_id, '')

Last edited by chaley; Today at 06:32 AM. Reason: Forgot to re-add < & >
chaley is offline   Reply With Quote
Advert
Old Today, 11:29 AM   #3
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,184
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
And just like that, magic has happened. Thanks so much Chaley!

I think one of the reasons I want this, currently, is to leave more space for other items in Details panel!

The first template looks nicer to me, though the second is enough for what I had in mind.

Attached Thumbnails
Click image for larger version

Name:	MWSnap 2024-10-07, 12_10_44.png
Views:	13
Size:	81.5 KB
ID:	211262  
Comfy.n is online now   Reply With Quote
Old Today, 12:39 PM   #4
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: 11,950
Karma: 7225107
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Given that screenshot I suspect that this template is more to your liking. The "Goodreads:" in the identifier is redundant, given the column name. This template shows only the identifier value without the "goodreads:" prefix. It is also slightly faster.
Code:
program:
	gr_id = select($identifiers, 'goodreads');
	if gr_id then
		l = urls_from_identifiers( 'goodreads:' & gr_id, '');
		l = re(l, '>goodreads<', '>' & gr_id & '<')
	else
		l = ''
	fi
chaley is offline   Reply With Quote
Old Today, 12:54 PM   #5
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,184
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
Thanks, I'm going to use this to eliminate the redundancy
Comfy.n is online now   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with title link custom column SallyK Library Management 2 12-18-2020 08:00 AM
Identifier-like custom column nqk Library Management 5 05-20-2017 01:38 AM
Custom Column to remember converted books deadman36g Library Management 2 06-23-2016 04:22 PM
Creating a Custom Column Link a_daley Library Management 5 02-16-2014 05:56 AM
Single column ePUB becomes 2 column when converted to Kindle (mobi) rmcape Conversion 0 09-21-2013 12:52 PM


All times are GMT -4. The time now is 02:19 PM.


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