05-26-2011, 05:25 PM | #1 |
Addict
Posts: 352
Karma: 103850
Join Date: Apr 2011
Device: Kindle NT
|
Columns
I was wondering if somebody could help me out. I have shelves and tags for my book. These both have just list of words. Is it possible to make a column which combines info from both those columns?
Like: Tag Fantasy Shelf Vampires Combined Column Fantasy, vampires Also could you point me in the right direction for calibrary "language". Where I could learn how to make columns and similar things. I know about the one in calibre manual. I think there has to be some more as I didn't find anything about combining two columns into one. TIA |
05-27-2011, 01:59 AM | #2 | |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
What you want is a custom composite column (I'm not sure at the moment what it's called in the english version, look for a column type "made from other columns"). Say your tag-column is called '#mytags' and your shelf-column is called '#myshelf', then the combined column would be defined by the template '{#mytags}, {#myshelf}' (without the quotes, of course). You should be aware, though, that you can't edit the content of a composite column- if you try to edit one, you'll just see the template, and any changes you make will affect all the columns' fields.
Quote:
|
|
Advert | |
|
05-27-2011, 05:06 AM | #3 |
Addict
Posts: 352
Karma: 103850
Join Date: Apr 2011
Device: Kindle NT
|
Thanks will try your template. I made that column before just the template was wrong and the result not what I wanted. Hope this works.
I wrote {tags}, {shelf} And the result is tags, But no shelfs What am I doing wrong? I chose column built from other columns, behaves like tags. Last edited by Noughty; 05-27-2011 at 05:11 AM. |
05-27-2011, 05:29 AM | #4 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Custom column names start with #
|
05-27-2011, 05:57 AM | #5 |
Addict
Posts: 352
Karma: 103850
Join Date: Apr 2011
Device: Kindle NT
|
I tried
{#tags}, {#shelf} but the result was , Just a comma. Without # I get just tags. My columns are tags and shelf How to write it correctly? I also tried {#tags, }{#shelf} And {#tags}{#shelf} And {#tags|| , }{#shelf} And a bunch of others What's left? Can someone just tell me what to write in template? I am also interested how to make template for saving books to disk. I have {author_sort}/{series}/{authors} - {series} {series_index} - {title} It works fine if a book is part of series, but if it is a single title I get Author - - Title. I would like to have Author - Title. Is it possible? Last edited by Noughty; 05-27-2011 at 07:00 AM. Reason: added question |
Advert | |
|
05-27-2011, 07:03 AM | #6 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
The tags column is a standard column and does not require the #.
If you hover the mouse over a column header in the main Calibre window it should show you the actual name to use in a template. I think the name displayed may also be case significant but I am not sure about that. |
05-27-2011, 08:05 AM | #7 | |
Addict
Posts: 352
Karma: 103850
Join Date: Apr 2011
Device: Kindle NT
|
Ok,that was the problem. Thanks you so much.
Is there a way to make it recognize the same tags and shelves so they aren't repeated? For example I have Tags: Contemporary, Shelf: contemporary, fantasy In custom column I get: Contemporary, contemporary, fantasy And if there is no tags (which is first in template), is there a way not to have it start with a comma in a new column I made? Like this: , contemporary , historical, fantasy And any ideas about: Quote:
|
|
05-27-2011, 08:17 AM | #8 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Glad you got somewhere.
I cannot help with the latest question, though. Maybe someone who is more acquainted with the Calibre template capabilities might have ideas when they came around. |
05-27-2011, 09:02 AM | #9 | ||
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
|
||
05-27-2011, 09:23 AM | #10 |
Addict
Posts: 352
Karma: 103850
Join Date: Apr 2011
Device: Kindle NT
|
Worked like a charm . Thanks to everybody who helped to fix my calibre.
Looking forward to the merge lists. |
05-27-2011, 12:04 PM | #11 |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Kovid accepted it for this release.
Once you upgrade, assuming that you want to use the case of the item in tags if there is a non-case-equivalent duplicate, use any one of the following 3 templates. The first two use "template program mode", while the last one is uses"general program mode". Code:
{tags:'merge_lists($, field('#shelf'), ',')'} {#shelf:'merge_lists(field('tags'), $, ',')'} program: merge_lists(field('tags'), field('#shelf'), ',') |
05-27-2011, 03:18 PM | #12 |
Addict
Posts: 352
Karma: 103850
Join Date: Apr 2011
Device: Kindle NT
|
Thanks works great
|
08-15-2011, 11:56 AM | #13 |
Addict
Posts: 352
Karma: 103850
Join Date: Apr 2011
Device: Kindle NT
|
I was wondering in custom column it is shown correctly alphabetically (tags and shelves) but in book details window I see:
Tags alphabetically, shelves alphabetically Why isn't it the same as in custom column? How to make it simple alphabetical? |
08-15-2011, 01:36 PM | #14 | |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If you are talking about the output of merge_lists, then use: Code:
program: list_sort(merge_lists(field('tags'), field('#textmult'), ','), 0, ',') |
|
08-15-2011, 02:21 PM | #15 |
Addict
Posts: 352
Karma: 103850
Join Date: Apr 2011
Device: Kindle NT
|
I mean that in book details it is written all tags first after all tags all shelves are written. Instead of having all tags and shelves mixed with each other so they would be alphabetical.
You suggestion will fix it? |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
0.7.46 and custom columns | meme | Library Management | 4 | 02-21-2011 04:21 AM |
Creating columns | Jabby | Library Management | 0 | 02-04-2011 05:46 PM |
Two columns broken in 7.24 | pollito pito | Calibre | 12 | 10-28-2010 06:00 PM |
I'm looking to convert 2 columns to 1 but ... | SeaBookGuy | 1 | 10-17-2010 08:19 PM | |
Columns | darkpoet | ePub | 8 | 09-09-2009 10:17 PM |