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 Yesterday, 12:33 PM   #1006
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,788
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by maddz View Post
What it's doing is if there are entries in all 3 fields is producing the output:
'Subseries' 'Subseries Index' - 'My Shelves' 'Hugo Nominations'

What I want it to do is produce:
'Subseries' 'Subseries Index' - 'My Shelves' - 'Hugo Nominations'

Ideally, it should be:
'Subseries' 'Subseries Index'
'My Shelves'
'Hugo Nominations'

But I am not sure if the subtitle field can take more than one line...

If there is less than three entries (every title will have 'My Shelves'), the line breaks for the subseries and Hugos should be suppressed, so there is either 1 line or 2 lines:

'My Shelves'

or

'Subseries' Subseries Index'
'My Shelves'

or

'My Shelves'
'Hugo Nominations'
Putting aside the newlines, this template does what the above says you want. There might be some misspellings in the column lookup names as I don't have those columns in my database.
Code:
{#subseries}{#subseries_index:| | - }{#myshelves}{#hugonominees:| - |}
I tested it with columns I have:
Code:
{#series}{#series_index:| | - }{#genre}{tags:| - |}
EDIT: According to this post I tested newlines in the subtitle and they didn't work. The the template below isn't useful.

This GPM template does the same thing except for using newlines instead of the minus signs.
Code:
program:
# This template produces a 1-to-3 line result.
# The first line is the subseries if there is one.
# The next line is the shelves, which are always present.
# The last line is the hugo nominees, if there is one.

	if $subseries then
		ss = $#subseries & ' ' & $#subseries_index & character('newline')
	else
		ss = ''
	fi;

	if $#hugonominees then
		hugo = character('newline') & $#hugonominees
	else
		hugo = ''
	fi;

	return ss & $#myshelves & hugo
NB: I left off some of the '#' characters in the template in my last post. I tested it with columns that exist then incorrectly edited it to reference your columns.

Last edited by chaley; Yesterday at 12:38 PM.
chaley is offline   Reply With Quote
Old Yesterday, 01:46 PM   #1007
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,294
Karma: 29121666
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 online now   Reply With Quote
Old Yesterday, 02:18 PM   #1008
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,788
Karma: 7029971
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 Yesterday, 02:51 PM   #1009
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,294
Karma: 29121666
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; Yesterday at 02:54 PM.
maddz is online now   Reply With Quote
Old Yesterday, 03:00 PM   #1010
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: 36,760
Karma: 146617620
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 Yesterday, 03:14 PM   #1011
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,294
Karma: 29121666
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 online now   Reply With Quote
Old Yesterday, 04:05 PM   #1012
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,788
Karma: 7029971
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 Yesterday, 04:47 PM   #1013
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,294
Karma: 29121666
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 online now   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 03:41 AM
Using Custom Metadata in Save Template EJvdH Calibre 1 07-02-2010 06:06 AM
Accessories Decalgirl Kindle 2 custom skin template srmalloy Amazon Kindle 6 04-09-2010 09:55 PM
Donations for Custom Recipes ddavtian Calibre 5 01-23-2010 04:54 PM
Help understanding custom recipes andersent Calibre 0 12-17-2009 02:37 PM


All times are GMT -4. The time now is 05:46 PM.


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