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 09-17-2012, 05: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: 15
Karma: 498230
Join Date: Sep 2012
Device: K4, PRS-T2
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, 06:24 AM   #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: 5,893
Karma: 1216548
Join Date: Jan 2010
Location: France
Device: Many android devices
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
 
Advertisement
Old 09-17-2012, 07: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: 15
Karma: 498230
Join Date: Sep 2012
Device: K4, PRS-T2
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, 07: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: 15
Karma: 498230
Join Date: Sep 2012
Device: K4, PRS-T2
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, 08:08 AM   #5
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: 5,893
Karma: 1216548
Join Date: Jan 2010
Location: France
Device: Many android devices
@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
Old 09-17-2012, 09: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: 15
Karma: 498230
Join Date: Sep 2012
Device: K4, PRS-T2
Thats awesome, thanks chaley
bump 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
PRS-T1 Collection order JSWolf Sony Reader 8 12-28-2011 02:42 AM
How to list collection in descending order? jackhulk Library Management 8 10-16-2011 02:12 PM
Getting Collection in Order. ErikaGC Library Management 2 09-15-2011 09:26 PM
Collection (via Calibre) out of order? Trauma Doll Sony Reader 2 12-27-2008 11:56 PM
Book order in a collection using Libprs stustaff Calibre 13 12-03-2007 01:21 PM


All times are GMT -4. The time now is 12:27 PM.


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