09-28-2010, 02:23 PM | #1 |
Connoisseur
Posts: 94
Karma: 78
Join Date: Nov 2009
Location: Germany
Device: iPad 2, Sony PRS-600 (no longer used)
|
Sorting books by title
Hello,
I noticed that Calibre is msart enough to detect an article at the beginning of the title. This way, 'The Client' is sorted correctly under 'C'. However, things are not that clear when it comes to other languages - for example, Nietsche's book Der Antichrist appears under 'D'. Is there a way to alter the setting and add der/die/das for German, so that books in this language appear in the right order? Thanks a lot for your answer. Laurentiu |
09-28-2010, 03:04 PM | #2 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Sorry, but no. And don't forget de, du, di, un/une/una (in the sense of 'a', not 'one'), etc.
However, this is prime tweak territory. Perhaps someone is willing to contribute the code? |
Advert | |
|
09-28-2010, 03:10 PM | #3 |
Connoisseur
Posts: 94
Karma: 78
Join Date: Nov 2009
Location: Germany
Device: iPad 2, Sony PRS-600 (no longer used)
|
I have not forgotten le/la/l'/les either This should be flexible enough, so that the user can create/edit it's own list, as needed.
|
09-28-2010, 03:16 PM | #4 |
Wizard
Posts: 2,013
Karma: 251649
Join Date: Apr 2010
Location: Tempe, AZ, USA, Earth
Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home)
|
Until someone does come up with code for it, a kludge would be to list it as Antichrist, Der.
We have author sort in the metadata screen; why not one for book titles? The entry in that field could automatically default to the exisiting title. (And, please, don't suggest I write code for it; I have no clue how to do so.) |
09-28-2010, 03:54 PM | #5 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
Advert | |
|
09-28-2010, 04:16 PM | #6 |
Wizard
Posts: 2,013
Karma: 251649
Join Date: Apr 2010
Location: Tempe, AZ, USA, Earth
Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home)
|
|
09-28-2010, 04:23 PM | #7 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Can I be snarky (with a smile) and say:
It's the "sort" field in the "books" table of metadata.db. If not, I'll point to the tweaks: Quote:
|
|
09-28-2010, 04:23 PM | #8 |
Well trained by Cats
Posts: 29,768
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
09-28-2010, 04:34 PM | #9 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
It should be pretty easy to provide access to this, if anyone really needs it, just as access to author_sort is provided. I suspect eventually someone will ask for it in a bug/feature enhancement request. Personally, I don't need any more options or complexity, but there's always someone out there who's bugged by the sort order of a title and wants more control.
|
09-28-2010, 05:20 PM | #10 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Title sort uses the RE
Code:
_title_pat = re.compile('^(A|The|An)\s+', re.IGNORECASE) Adding read/write GUI access would require much more work, because the sort field is filled in by a DB trigger. |
09-28-2010, 06:40 PM | #11 |
Wizard
Posts: 2,013
Karma: 251649
Join Date: Apr 2010
Location: Tempe, AZ, USA, Earth
Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home)
|
Uh, guys, there is a reason I chose the confused looking old lady avatar (besides the fact I'm a confused old lady). You have to keep in mind I need very, very simple explainations/ directions for pretty much everything. Fortunately, theducks (thank you) spelled it out that isn't something easily accessed by a fuddyduddy fogey like me.
|
09-29-2010, 08:23 AM | #12 |
Connoisseur
Posts: 94
Karma: 78
Join Date: Nov 2009
Location: Germany
Device: iPad 2, Sony PRS-600 (no longer used)
|
|
09-29-2010, 08:46 AM | #13 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
|
09-29-2010, 09:09 AM | #14 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
It's in the root of the Calibre Library. It is the Calibre database. You can't edit the sort field directly due to the trigger. For the adventurous, it's possible to DROP the trigger, change that field, then CREATE it back, but any change to the sort field would be overwritten during the following UPDATE, which starts the trigger. You'd have to change the code that Charles pointed to to keep the change. (I don't recommend this, but I was interested, so I wrote a bit of test code to do this, and I tried it manually. Both worked, but it's still possible that it has side effects I didn't notice.)
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Sorting folders by author/series/title | goodreader16 | Library Management | 15 | 05-06-2011 01:18 AM |
Did sorting by title change in 7.19? | EricLandes | Calibre | 2 | 09-20-2010 04:08 PM |
Title Sorting / Author Sorting | ahi | Sony Reader | 0 | 09-14-2009 01:51 PM |
Sorting collections by author/title | Emily Hope | Sony Reader | 13 | 08-30-2009 12:12 AM |
Sorting the books on the cybook | Emmanuel | Calibre | 2 | 02-27-2009 12:46 PM |