Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-06-2013, 03:46 PM   #1
HFC3
Enthusiast
HFC3 began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Apr 2013
Device: Kindle Touch
[SOLVED] Using "Build column from other column" custom-column type

Is there any documentation on how to do this? Searching for "Build" returns no hits.

I'm assuming this type is supposed to let you have a new column X be assigned a value based on the value of existing column Y.

But;
1. I used a search filter "format:MOBI" to test this - column was filled with the template "format:MOBI" literal.
2. Where do you indicate what value is assigned?

Say I want to assign a new Yes/No column "MOBI" to Y (checked) if the a book includes a version in MOBI format (search filter "format:MOBI")

Thanks (yet) again

Last edited by HFC3; 07-07-2013 at 03:24 AM. Reason: Annotate Solved
HFC3 is offline   Reply With Quote
Old 07-06-2013, 04:49 PM   #2
chaley
"chaley", not "charley"
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: 4,993
Karma: 802238
Join Date: Jan 2010
Location: France
Device: Many android devices
That kind of column uses a template to generate it's value. There are many threads about using templates. There are calibre doc sections on the same topic, for example the template language docs.

Last edited by chaley; 07-07-2013 at 03:01 AM. Reason: fix typos caused by using a swipe keyboard
chaley is offline   Reply With Quote
Old 07-06-2013, 04:54 PM   #3
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 6,512
Karma: 42609940
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
See http://manual.calibre-ebook.com/template_lang.html

Try this:

Code:
{:'in_list(approximate_formats(), ',' , 'MOBI',  'Y',  '')'}
Quote:
approximate_formats() – return a comma-separated list of formats that at one point were associated with the book. There is no guarantee that the list is correct, although it probably is. This function can be called in template program mode using the template {:'approximate_formats()'}. Note that format names are always uppercase, as in EPUB.
Quote:
in_list(separator, pattern, found_val, not_found_val) – interpret the field as a list of items separated by separator, comparing the pattern against each value in the list. If the pattern matches a value, return found_val, otherwise return not_found_val.
Also see the documentation for Using functions in templates - template program mode
PeterT is offline   Reply With Quote
Old 07-07-2013, 03:11 AM   #4
HFC3
Enthusiast
HFC3 began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Apr 2013
Device: Kindle Touch
Thanks PeterT.

I wish the Calibre manual would include links to all the sub-manuals I'm finding for the "neat" features. It's hard to know they're there unless you accidentally find a link in a thread.

I did try searching for this in the >F1< help, but (of course), I used search words ("build", "custom column", etc) that didn't include "template".
HFC3 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom yes/no column built from long text column Philantrop Library Management 7 03-23-2013 07:44 PM
how to move value(s) of tag column to a custom made column zoorakhan Library Management 0 12-08-2012 03:53 AM
Custom column not recognized in "Sending books to devices" cheveguerra Devices 4 12-05-2011 01:58 PM
Custom column: "Updated date", when adding new "versions" of the same file? enriquep Library Management 16 11-03-2011 10:46 AM


All times are GMT -4. The time now is 05:33 AM.


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