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 04-16-2015, 01:28 AM   #1
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Avoid Alphabetically sorted custom columns

Hi.

I have created the following custom column on advice from BetterRed (see attached image), but when I add stories I get more than just the names of the characters in that specific column (see second attached image).

Have I done something wrong or is it the wrong way to put it.

What I am trying to do, is avoid Calibre sorting it alphabetically, if I edit in the main column.
Attached Thumbnails
Click image for larger version

Name:	Skærmbillede 2015-04-16 07.25.39.png
Views:	369
Size:	33.7 KB
ID:	137321   Click image for larger version

Name:	Skærmbillede 2015-04-16 07.28.22.png
Views:	349
Size:	146.9 KB
ID:	137322  
Tanjamuse is offline   Reply With Quote
Old 04-16-2015, 03:44 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: 12,356
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
There are three issues here.

First is the appearance if the [u' characters. This is a bug in the raw_field function. I have submitted a fix.

Second is the assumption that you need to use raw_field. The only field (column) that is sorted alphabetically by default is tags. All custom multiple-value functions are sorted only when displayed (usually). When used in templates they are not sorted. Because of this, and because you are manipulating a custom column, you can use
Code:
{#characters(0,1,\,)}
or
Code:
program: sublist(field('#characters'), 0, 1, ',')
The third is the column type you are using for #characters. Because these are character names and because (if I understand correctly) you want to preserve a known order when editing that column, you should check the box "Contains names" in the #character column definition. The separator will become ampersand (&) instead of comma and the values will be displayed in the order you entered them. If you do this then the main_character template becomes
Code:
{#characters:sublist(0,1,&)}
If you check the box you must change any template that uses a "list" function with a separator of ',' to use '&'.
chaley is offline   Reply With Quote
Advert
Old 04-16-2015, 03:47 AM   #3
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
But when I download, the Fanfiction, the characters are automatically separated by commas instead of &.

How would that affect it?
Tanjamuse is offline   Reply With Quote
Old 04-16-2015, 03:52 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: 12,356
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Tanjamuse View Post
But when I download, the Fanfiction, the characters are automatically separated by commas instead of &.

How would that affect it?
It won't work.

Either:
  • the FFDL offers the option of treating them as names (separating them with &),
  • you run a search & replace to convert the column separator from ',' to '&', or
  • you live with showing the columns in alpha order when you edit them.
chaley is offline   Reply With Quote
Old 04-16-2015, 11:44 AM   #5
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,876
Karma: 4604435
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by chaley View Post
  • the FFDL offers the option of treating them as names (separating them with &),
For the benefit of readers who might come here, but not see the answering post in the FanFicFare thread:

In FanFicFare personal.ini in the appropriate section you can add:

Code:
join_string_characters:\s&\s
Then instead of ', ' it will use ' & ' when joining the list.
JimmXinu is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom columns question Noughty Library Management 9 10-11-2011 08:46 AM
Rooted Color --> Custom ROM --> Avoid the Update anamardoll Nook Color & Nook Tablet 57 05-05-2011 04:14 AM
Custom Columns - How are you using yours? nynaevelan Library Management 19 04-18-2011 12:42 AM
0.7.46 and custom columns meme Library Management 4 02-21-2011 04:21 AM
composite custom columns sorted numerically Doug-W Library Management 2 02-18-2011 02:16 AM


All times are GMT -4. The time now is 01:26 PM.


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