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 06-09-2024, 02:46 PM   #1006
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 30039536
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Ah yes - my mistake, it was you not Davidfor who helped me with the initial set-up for the subtitle field.

I think I will leave things as they are, although it's annoying not to have the separator (-) between the 'My Shelves' and 'Hugo Nominations' sections. I suspect I would need to change the order to subtitle, Hugo nominations, my shelves to get the separator working correctly.

Thanks for all your help!
maddz is offline   Reply With Quote
Old 06-09-2024, 03:18 PM   #1007
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,102
Karma: 7908993
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by maddz View Post
Ah yes - my mistake, it was you not Davidfor who helped me with the initial set-up for the subtitle field.

I think I will leave things as they are, although it's annoying not to have the separator (-) between the 'My Shelves' and 'Hugo Nominations' sections. I suspect I would need to change the order to subtitle, Hugo nominations, my shelves to get the separator working correctly.

Thanks for all your help!
But as I said, your template breaks the rules, specifically the "no subtemplates in Single Function Mode" one. It it works then it is by accident. It could fail at any time.

Try the template I last posted:
Code:
{#subseries}{#subseries_index:| | - }{#myshelves}{#hugonominees:| - |}
It should produce the same result except for properly placing the hyphen, without breaking the rules.
chaley is offline   Reply With Quote
Old 06-09-2024, 03:51 PM   #1008
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 30039536
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Quote:
Originally Posted by chaley View Post
But as I said, your template breaks the rules, specifically the "no subtemplates in Single Function Mode" one. It it works then it is by accident. It could fail at any time.

Try the template I last posted:
Code:
{#subseries}{#subseries_index:| | - }{#myshelves}{#hugonominees:| - |}
It should produce the same result except for properly placing the hyphen, without breaking the rules.
I did. I got PLUGBOARD ERROR on the Kobo whereas my modification to the original code works apart from the missing hyphen.

This is in the Kobo Utilities plug-in? The KoboExtended driver? It doesn't seem to be possible to create a metadata plugboard to input to the subtitle field.

Last edited by maddz; 06-09-2024 at 03:54 PM.
maddz is offline   Reply With Quote
Old 06-09-2024, 04:00 PM   #1009
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 41,459
Karma: 158775170
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by maddz View Post
This is in the Kobo Utilities plug-in? The KoboExtended driver? It doesn't seem to be possible to create a metadata plugboard to input to the subtitle field.
I didn't feel like creating the custom columns but I suspect it should be in the subtitle field on page 3 (Metadata, on device & advanced) of the KoboTouch/KoboTouchExtended driver configuration dialog.
DNSB is offline   Reply With Quote
Old 06-09-2024, 04:14 PM   #1010
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 30039536
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Quote:
Originally Posted by DNSB View Post
I didn't feel like creating the custom columns but I suspect it should be in the subtitle field on page 3 (Metadata, on device & advanced) of the KoboTouch/KoboTouchExtended driver configuration dialog.
Yes, that's where I've input it, as well as in the dialogue box when you click on the plug-in selector (the down arrow) and select the 'Update metadata in device library' option.
maddz is offline   Reply With Quote
Old 06-09-2024, 05:05 PM   #1011
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,102
Karma: 7908993
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by maddz View Post
I did. I got PLUGBOARD ERROR on the Kobo whereas my modification to the original code works apart from the missing hyphen.

This is in the Kobo Utilities plug-in? The KoboExtended driver? It doesn't seem to be possible to create a metadata plugboard to input to the subtitle field.
What is the rest of the error message?

My guess is that I misspelled one of your column names. You can test this by using the template editor/tester.
chaley is offline   Reply With Quote
Old 06-09-2024, 05:47 PM   #1012
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 30039536
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Quote:
Originally Posted by chaley View Post
What is the rest of the error message?

My guess is that I misspelled one of your column names. You can test this by using the template editor/tester.
I amended my original code to match yours and got the error... It was the same message if I copy/pasted your code.

I'll check next time I fire up Calibre; it's nearly bedtime for me.
maddz is offline   Reply With Quote
Old 07-13-2024, 03:53 PM   #1013
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 781
Karma: 340954
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Hello everyone, I have an advanced rule that I use in the emblems part to show me the author's image next to the cover.
program: rslt=''; tags = $tags;
rslt = list_item(tags, 0, '&') & '.png';
for i in range(1, list_count(tags, '&')):
if i == 4 then break fi;
rslt = rslt & ':' & list_item(tags, i, '&') & '.png'
rof;
return rslt

I thought about using it in the tags column to put one icon per label but it only shows me a single icon with the images of the other tags.
Any solution or comment would be helpful.
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	201
Size:	91.8 KB
ID:	209546  

Last edited by dunhill; 07-13-2024 at 04:05 PM.
dunhill is offline   Reply With Quote
Old 07-13-2024, 05:33 PM   #1014
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,102
Karma: 7908993
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dunhill View Post
Hello everyone, I have an advanced rule that I use in the emblems part to show me the author's image next to the cover.
program: rslt=''; tags = $tags;
rslt = list_item(tags, 0, '&') & '.png';
for i in range(1, list_count(tags, '&')):
if i == 4 then break fi;
rslt = rslt & ':' & list_item(tags, i, '&') & '.png'
rof;
return rslt

I thought about using it in the tags column to put one icon per label but it only shows me a single icon with the images of the other tags.
Any solution or comment would be helpful.
Tags use a comma as a separator, not an ampersand.
chaley is offline   Reply With Quote
Old 07-14-2024, 07:17 PM   #1015
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 781
Karma: 340954
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by chaley View Post
Tags use a comma as a separator, not an ampersand.
Thank Chaley, it worked!!
dunhill is offline   Reply With Quote
Old 09-06-2024, 01:15 PM   #1016
Mister L
Groupie
Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Posts: 173
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
I am trying to create a custom column from tags to manage collections on the kobo, but no values are being added (neither in the column, nor in the collections on the device). Maybe it's because I'm trying to use regex in the program code?

When I add a book recommended by someone, I add a tag "reco [name]". So for instance "reco Martha Wells". I would like the copy this tag to the "reco" column to use as a collection column.

I created a "reco" column from other columns, acts like tags:
Code:
program:
	switch_if(
		$tags == 'reco (.*)', 'reco \1', 
		'')
But this "reco" column is never filled. Am I missing a step somewhere?



Part two, would it be possible to also, automatically add any books with a value in the "reco" column to a general collection named "friends recos"?

Could I do that with something like this, either in the column or in the collections model in the KoboTouchExtended Driver?
Code:
program:
	switch_if(
		$tags == 'reco (.*)', 'reco \1', 
		$tags == 'reco (.*)', 'recos amis', 
		'')
Mister L is offline   Reply With Quote
Old 09-06-2024, 02:13 PM   #1017
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,102
Karma: 7908993
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Mister L View Post
I am trying to create a custom column from tags to manage collections on the kobo, but no values are being added (neither in the column, nor in the collections on the device). Maybe it's because I'm trying to use regex in the program code?

When I add a book recommended by someone, I add a tag "reco [name]". So for instance "reco Martha Wells". I would like the copy this tag to the "reco" column to use as a collection column.

I created a "reco" column from other columns, acts like tags:
Code:
program:
	switch_if(
		$tags == 'reco (.*)', 'reco \1', 
		'')
But this "reco" column is never filled. Am I missing a step somewhere?



Part two, would it be possible to also, automatically add any books with a value in the "reco" column to a general collection named "friends recos"?

Could I do that with something like this, either in the column or in the collections model in the KoboTouchExtended Driver?
Code:
program:
	switch_if(
		$tags == 'reco (.*)', 'reco \1', 
		$tags == 'reco (.*)', 'recos amis', 
		'')
The expression you are using won't work in the template language. I didn't add perl syntax.

Also, if I am understanding you correctly there can be multiple 'reco XX' tags attached to a book. In this case you must process the tags one at a time. This template does that, and your case 2.
Code:
program:
	result = '';
	for t in $tags:
		if substr(t, 0, 5) == 'reco ' then
			result = list_join(',', result, ',', t & ',' & 'recos amis', ',')
		fi
	rof;
	result
Alternatively you could do it in python template mode using a list comprehension that filters out anything not starting with 'reco '. Try that if you know python.
chaley is offline   Reply With Quote
Old 09-06-2024, 04:10 PM   #1018
Mister L
Groupie
Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Posts: 173
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
Quote:
Originally Posted by chaley View Post
The expression you are using won't work in the template language. I didn't add perl syntax.
Ha. I knew it was the regex causing trouble.

Quote:
Originally Posted by chaley View Post
Also, if I am understanding you correctly there can be multiple 'reco XX' tags attached to a book. In this case you must process the tags one at a time. This template does that, and your case 2.
Code:
program:
	result = '';
	for t in $tags:
		if substr(t, 0, 5) == 'reco ' then
			result = list_join(',', result, ',', t & ',' & 'recos amis', ',')
		fi
	rof;
	result
Excellent. Works perfectly! Thank you!
Mister L is offline   Reply With Quote
Old 10-17-2024, 12:48 AM   #1019
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: 9,779
Karma: 68360983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Click image for larger version

Name:	2024-10-17 00_47_43-Window.png
Views:	40
Size:	12.2 KB
ID:	211451

As I often re-read books, I like to store all my completion dates in a taglike column (e.g. 2021-03-13, 2022-04-21, 2023-04-17, 2024-05-29). I use this composite column to group them by month in the tag browser:

Code:
program:

	new_dates = '';

	for dates in '#datesread':
		converted = format_date(dates, 'yyyy.MM (MMMM)');
		new_dates = list_union(new_dates, converted, ',')
	rof

Last edited by ownedbycats; 10-17-2024 at 10:00 PM.
ownedbycats is offline   Reply With Quote
Old 10-18-2024, 06:05 PM   #1020
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 523
Karma: 1334365
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
It looks really good. But I'm always afraid - justified or not - that all the composite coloumns will make calibre slower and slower.
Wiggo is offline   Reply With Quote
Reply

Tags
custom column, tag, tags


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom column i need a little help shinken Calibre 3 09-15-2010 04:41 AM
Using Custom Metadata in Save Template EJvdH Calibre 1 07-02-2010 07:06 AM
Accessories Decalgirl Kindle 2 custom skin template srmalloy Amazon Kindle 6 04-09-2010 10:55 PM
Donations for Custom Recipes ddavtian Calibre 5 01-23-2010 05:54 PM
Help understanding custom recipes andersent Calibre 0 12-17-2009 03:37 PM


All times are GMT -4. The time now is 11:28 AM.


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