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-18-2014, 06:48 PM   #1
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Tags are Sorted but...

I create a custom column like tags - fandom/Fandom

When I enter Tags they are sorted in the Book List and in Book Details

When I enter Fandoms they are sorted in the Book List but they are not sorted Book Details

If I use the template {tags:sublist(0,1,\,)} I get the first Tag in an alpha sorted list.

If I use the template {#fandom:sublist(0,1,\,)} I get the first Fandom I entered.

Is there any way I can get a list of Tags in the order I entered them?

BR
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	307
Size:	42.5 KB
ID:	128533  

Last edited by BetterRed; 09-18-2014 at 07:00 PM. Reason: add jpg
BetterRed is offline   Reply With Quote
Old 09-18-2014, 08:49 PM   #2
BookJunkieLI
Evangelist
BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.
 
BookJunkieLI's Avatar
 
Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,
Any of these three options will keep them in the order that you enter the information:

Column like tags with Contains Names checked
Text, column shown in the tag browser
Long Text like comments

I'm currently using all three in my import library for pairings because I can't decide which method I prefer.
BookJunkieLI is offline   Reply With Quote
Advert
Old 09-18-2014, 11:42 PM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
BR: This was raised earlier in the year. Kovid said no because of problems with templates and, from memory, he thought that alphabetical was more logical. Plus he thought the metadata sources were sorting them. Personally, I enter them in order of importance, so I would like to display them that way. I did have as look at what was needed to change it and add a tweak. There wasn't that much, but there was one spot the tags were displayed that I couldn't find.
davidfor is offline   Reply With Quote
Old 09-19-2014, 02:01 AM   #4
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
Quote:
Originally Posted by BetterRed View Post
Is there any way I can get a list of Tags in the order I entered them?

BR
I have submitted code to Kovid for a new formatter function "raw_list", an analog of the existing raw_field function. It returns the list in the order found in the db. Example:
Code:
{tags:'sublist(raw_list($, ','), 0, 1, ',')'}
The code is in source now.
chaley is offline   Reply With Quote
Old 09-19-2014, 02:28 AM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Bookjunkie - Tags is a built in column I cannot change its type.

@davidfor - thanks, no secret list_unsort function then

Can you recall if the opposite solution was considered, i.e a custom column with Column Type of "Comma separated text, like tags, shown in the tag browser" was be sorted like tags are always sorted. Yes they are sorted in the Book List, but not in Book Details and hence not when used in a template.

If a '!' was prepended to the Tag that I want first, that would force it to the top if the list.

Can someone furnish me with a template that will examine the first character of the first tag and if it is '!' then return the substring of first tag from position 1 to end, otherwise return the first tag. I tried but it didn't work

So !Underpass would return Underpass and Crossover would return Crossover.

Quote:
Originally Posted by chaley View Post
I have submitted code to Kovid for a new formatter function "raw_list", an analog of the existing raw_field function. It returns the list in the order found in the db..
Added : @chaley - yet again

BR

Last edited by BetterRed; 09-19-2014 at 02:33 AM.
BetterRed is offline   Reply With Quote
Advert
Old 09-19-2014, 02:47 AM   #6
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
Quote:
Originally Posted by BetterRed View Post
Can someone furnish me with a template that will examine the first character of the first tag and if it is '!' then return the substring of first tag from position 1 to end, otherwise return the first tag. I tried but it didn't work

So !Underpass would return Underpass and Crossover would return Crossover.
Code:
{tags:'re(sublist($, 0, 1, ','), '^!', '')'}
chaley is offline   Reply With Quote
Old 11-24-2016, 03:17 PM   #7
Irian
Enthusiast
Irian has a complete set of Star Wars action figures.Irian has a complete set of Star Wars action figures.Irian has a complete set of Star Wars action figures.Irian has a complete set of Star Wars action figures.Irian has a complete set of Star Wars action figures.
 
Posts: 47
Karma: 450
Join Date: Mar 2011
Device: PRS-600, PRS-650, Tolino Vision 3 HD, Kobo Libra H20
Quote:
Originally Posted by chaley View Post
Code:
{tags:'sublist(raw_list($, ','), 0, 1, ',')'}
Tried this, but unfortunately, it only returns the alphabetically sorted tag list, not the original one that is also displayed in the metadata.
Irian is offline   Reply With Quote
Old 11-24-2016, 03:37 PM   #8
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
Quote:
Originally Posted by Irian View Post
Tried this, but unfortunately, it only returns the alphabetically sorted tag list, not the original one that is also displayed in the metadata.
Actually it returns incorrect information. The raw_list function requires a field name, not a value.

Try
Code:
{:'sublist(raw_list('tags', ','), 0, 1, ',')'}
However, I must note that depending on the order of entry of tags is problematic. If *anything* happens to that first tag, for example a case change operation, then the order will change. The order can change for other reasons as well. If the "first" tag is as important as it appears to be then you should create a text custom column (not like tags) and enter it there.
chaley is offline   Reply With Quote
Old 11-25-2016, 01:05 AM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@chaley - I must have overlooked your 'mistake', I probably went to the manual when the change was released and worked from there.

But in the main, to force an item to be first, second and third in a sorted list, I use the time honoured fudge of pre-pending values with a bang (!), a crunch (#), and a hat (^).

BR
BetterRed is offline   Reply With Quote
Old 11-26-2016, 02:43 PM   #10
Irian
Enthusiast
Irian has a complete set of Star Wars action figures.Irian has a complete set of Star Wars action figures.Irian has a complete set of Star Wars action figures.Irian has a complete set of Star Wars action figures.Irian has a complete set of Star Wars action figures.
 
Posts: 47
Karma: 450
Join Date: Mar 2011
Device: PRS-600, PRS-650, Tolino Vision 3 HD, Kobo Libra H20
Thanks chaley, works fine. I would prefer using tags, but I understand the danger there. Anyway, at least I know have the choice.
Irian is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura Series index not sorted nickygerritsen Kobo Reader 3 07-30-2014 04:28 AM
Trying to get collections sorted on PRS-T1 capnm Devices 5 03-13-2013 07:13 PM
Help With Books Sorted on Disc alikayn Calibre 11 11-12-2012 11:31 PM
Books sorted by Number within Series - is it possible? s.g. Calibre 8 11-29-2011 09:59 AM
Amazon Tags - Popular tags vs Unique tags. chrisanthropic Writers' Corner 6 09-19-2011 11:18 PM


All times are GMT -4. The time now is 03:57 AM.


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