![]() |
#1 |
Connoisseur
![]() ![]() ![]() Posts: 88
Karma: 200
Join Date: Nov 2010
Location: Dortmund, Germany
Device: Kindle Paperwhite (10. Generation)
|
Multiple comma separated values in composite column?
Would it be possible to have a way to get a composite column to be treated like tags?
The most important thing that I'm pretty sure I can't get to work unless there is a code change, is for it to display like tags in the tag browser. Other stuff this might include, but that might be doable by applying the right template functions is to sort the comma separated entries (for display in the browser) and get rid of duplicates. Last edited by silentguy; 04-12-2011 at 05:32 PM. Reason: Mixed up custom with composite |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,149
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In the create custom column dialog, click the "Tags" quick create link.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() ![]() ![]() Posts: 88
Karma: 200
Join Date: Nov 2010
Location: Dortmund, Germany
Device: Kindle Paperwhite (10. Generation)
|
Ah, sorry, mixed up two words. I meant a COMPOSITE column, i.e. one generated using templates.
Essentially I want to implement something along the lines of "automatic tags" by merging tags, series, special keywords added if conditions are fulfilled, etc. |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
I would imagine you could do something like this using a custom template function. However, I don't know the first thing about those, so here's the link to the manual
![]() |
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() ![]() Posts: 88
Karma: 200
Join Date: Nov 2010
Location: Dortmund, Germany
Device: Kindle Paperwhite (10. Generation)
|
I already tried creating a custom template function and it almost works like a charm, it does all the merging, removing of duplicates, etc, but mow i would like a way to tell calibre to treat the result as a list of tags. I mainly notice that it does not do so in the browser on the left, I don't know if there are other places where tags get special treatment.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,317
Karma: 7975240
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Composite columns are treated as "text, shown in tag browser" columns, assuming the 'show in tag browser' box is checked. There is no way to get them to be treated as "text, tags-like", columns, internally known as "is_multiple" columns.
The only workaround is to use search/replace (edit metadata bulk) to copy the value of the composite column to an is_multiple column (tags or some custom column). |
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() ![]() Posts: 88
Karma: 200
Join Date: Nov 2010
Location: Dortmund, Germany
Device: Kindle Paperwhite (10. Generation)
|
Damn, too bad... I guess I'll add a bug report/feature request then. Not that important really, but would be nice to have and that way it'll be on the list in case anybody ever get's bored enough to implement it
![]() |
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() ![]() ![]() Posts: 88
Karma: 200
Join Date: Nov 2010
Location: Dortmund, Germany
Device: Kindle Paperwhite (10. Generation)
|
Thanks for fulfilling my request, it work's really nice. The only thing I noticed is that actually displaying my column in the tag browser significantly slows down loading.
With a large library (~10.000 books) it takes around 6 seconds to start calibre (with or without my column) but if i tell it to display my column, it takes around 36 seconds to load. Is it really this expensive to build the tag tree? It is there a resource leak somewhere? |
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,317
Karma: 7975240
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
For every book in the database: - split the field apart into its component tags (split on comma) - check if an individual component has been seen before. If not, add it to the tags values data structures. For real tags fields, this happens once instead of once per book, because the individual tag values are available in the database. In your case, this means that there are 10,000 more loops. That said, while looking at the code I did notice a few things that I could improve, so performance might get somewhat better. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Tool] Multi-column PDF files on 6 inch display. | Taesoo Kwon | 99 | 04-09-2014 06:16 AM | |
Q: multi-column PDF to single column mobi format converstion | auburn1975 | Calibre | 7 | 01-28-2012 06:11 PM |
Can custom book data be displayed in a custom column? | kiwidude | Development | 9 | 03-02-2011 05:35 AM |
Multi column sort? | nexus100 | Calibre | 1 | 07-11-2010 11:19 PM |
Multi-column articles in PDF | tdido | OpenInkpot | 7 | 06-30-2009 11:13 AM |