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 09-17-2012, 04:03 AM   #1
bump
Member
bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.
 
Posts: 16
Karma: 498230
Join Date: Sep 2012
Device: Kobo Aura One, Kobo Glo HD
Question Collection order

Hi,

joined today and already have a question.
I use a couple of custom columns to manage the collections of my readers.
The collections should be in a specific order (currently read books, then series, then tags etc). For fields with only one value, eg series I copy the field and add a number at the beginning, like {series:|1. |}.

My only problem is that this don't work with tags, as there are multiple comma separated values in it. I guess I have to use subitems or sublist, but how can I add a text in front of each value?

Any hint is really appreciated
bump is offline   Reply With Quote
Old 09-17-2012, 05:24 AM   #2
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,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
If the same prefix is put on each tag then you can do it with list_re.

If the prefix must change according to the value of the tag, then things are much more interesting. It can be done in general program mode with a sequence of list_re, one for each value to change, but this will have bad performance. If you know some programming and python, then the best approach would be a custom formatter function, because you can loop over the values and generate whatever result you want.
chaley is offline   Reply With Quote
Advert
Old 09-17-2012, 06:21 AM   #3
bump
Member
bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.
 
Posts: 16
Karma: 498230
Join Date: Sep 2012
Device: Kobo Aura One, Kobo Glo HD
Hi chaleay,

many thanks. All tags will have the same prefix, so I guess list_re will work.
Unfortunately I do not have any programming experience any my try failed.
Could you please give me a hint on how to use it in a custom column?

Cheers,
bump is offline   Reply With Quote
Old 09-17-2012, 06:37 AM   #4
bump
Member
bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.
 
Posts: 16
Karma: 498230
Join Date: Sep 2012
Device: Kobo Aura One, Kobo Glo HD
Nevermind, I found my error.
If anyone wants to achive the same, this is what I did:

program:list_re(field('tags'), ',', '^', 'prefix')

Thanks again to point me in the right direction.
bump is offline   Reply With Quote
Old 09-17-2012, 07:08 AM   #5
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,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@bump: you could also do the job in template program mode with
Code:
{tags:'list_re($,  ',',  '^', 'prefix')'}
There are some situations where this could work better, such as when your want to use more than one template expression in the column.
chaley is offline   Reply With Quote
Advert
Old 09-17-2012, 08:17 AM   #6
bump
Member
bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.bump ought to be getting tired of karma fortunes by now.
 
Posts: 16
Karma: 498230
Join Date: Sep 2012
Device: Kobo Aura One, Kobo Glo HD
Thats awesome, thanks chaley
bump is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-T1 Collection order JSWolf Sony Reader 8 12-28-2011 01:42 AM
How to list collection in descending order? jackhulk Library Management 8 10-16-2011 01:12 PM
Getting Collection in Order. ErikaGC Library Management 2 09-15-2011 08:26 PM
Collection (via Calibre) out of order? Trauma Doll Sony Reader 2 12-27-2008 10:56 PM
Book order in a collection using Libprs stustaff Calibre 13 12-03-2007 12:21 PM


All times are GMT -4. The time now is 02:59 AM.


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