Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-28-2010, 02:23 PM   #1
Laurentiu
Connoisseur
Laurentiu has learned how to buy an e-book online
 
Laurentiu's Avatar
 
Posts: 84
Karma: 78
Join Date: Nov 2009
Location: Germany
Device: Sony PRS-600, iPad 2
Question 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
Laurentiu is offline   Reply With Quote
Old 09-28-2010, 03:04 PM   #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,268
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
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?
chaley is offline   Reply With Quote
 
Enthusiast
Old 09-28-2010, 03:10 PM   #3
Laurentiu
Connoisseur
Laurentiu has learned how to buy an e-book online
 
Laurentiu's Avatar
 
Posts: 84
Karma: 78
Join Date: Nov 2009
Location: Germany
Device: Sony PRS-600, iPad 2
Quote:
Originally Posted by chaley View Post
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?
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.
Laurentiu is offline   Reply With Quote
Old 09-28-2010, 03:16 PM   #4
Lady Fitzgerald
Wizard
Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.
 
Lady Fitzgerald's Avatar
 
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.)
Lady Fitzgerald is offline   Reply With Quote
Old 09-28-2010, 03:54 PM   #5
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Lady Fitzgerald View Post
We have author sort in the metadata screen; why not one for book titles?
We already have one. It's the "sort" field in the "books" table of metadata.db.
Starson17 is offline   Reply With Quote
Old 09-28-2010, 04:16 PM   #6
Lady Fitzgerald
Wizard
Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.
 
Lady Fitzgerald's Avatar
 
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)
Quote:
Originally Posted by Starson17 View Post
We already have one. It's the "sort" field in the "books" table of metadata.db.
News to me. Where does one find that?
Lady Fitzgerald is offline   Reply With Quote
Old 09-28-2010, 04:23 PM   #7
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Lady Fitzgerald View Post
News to me. Where does one find that?
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:
# Control title and series sorting in the library view.
# If set to 'library_order', Leading articles such as The and A will be ignored.
# If set to 'strictly_alphabetic', the titles will be sorted without processing
# For example, with library_order, The Client will sort under 'C'. With
# strictly_alphabetic, the book will sort under 'T'.
# This flag affects Calibre's library display. It has no effect on devices. In
# addition, titles for books added before changing the flag will retain their
# order until the title is edited. Double-clicking on a title and hitting return
# without changing anything is sufficient to change the sort.
title_series_sorting = 'library_order'
Starson17 is offline   Reply With Quote
Old 09-28-2010, 04:23 PM   #8
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,503
Karma: 5567067
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Lady Fitzgerald View Post
News to me. Where does one find that?
I don,t believe you can without being places that only the Guru's should even think about
SQLite Database browser will let you "peek", but it is best to keep your hands off
theducks is offline   Reply With Quote
Old 09-28-2010, 04:34 PM   #9
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by theducks View Post
I don,t believe you can without being places that only the Guru's should even think about
SQLite Database browser will let you "peek", but it is best to keep your hands off
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.
Starson17 is offline   Reply With Quote
Old 09-28-2010, 05:20 PM   #10
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,268
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Title sort uses the RE
Code:
_title_pat = re.compile('^(A|The|An)\s+', re.IGNORECASE)
It wouldn't be outrageously difficult to add a tweak to change the pattern to any sequence of words or what-have-you.

Adding read/write GUI access would require much more work, because the sort field is filled in by a DB trigger.
chaley is offline   Reply With Quote
Old 09-28-2010, 06:40 PM   #11
Lady Fitzgerald
Wizard
Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.Lady Fitzgerald ought to be getting tired of karma fortunes by now.
 
Lady Fitzgerald's Avatar
 
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.
Lady Fitzgerald is offline   Reply With Quote
Old 09-29-2010, 08:23 AM   #12
Laurentiu
Connoisseur
Laurentiu has learned how to buy an e-book online
 
Laurentiu's Avatar
 
Posts: 84
Karma: 78
Join Date: Nov 2009
Location: Germany
Device: Sony PRS-600, iPad 2
Quote:
Originally Posted by Starson17 View Post
We already have one. It's the "sort" field in the "books" table of metadata.db.
Where is that metadata.db table? A search on the calibre folder did not find anything.
Laurentiu is offline   Reply With Quote
Old 09-29-2010, 08:46 AM   #13
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,048
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by Laurentiu View Post
Where is that metadata.db table? A search on the calibre folder did not find anything.
metadata.db is a FILE that is the main calibre database holding metadata and is normally located at the root of the Calibre library. Mess with it at your peril
itimpi is offline   Reply With Quote
Old 09-29-2010, 09:09 AM   #14
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Laurentiu View Post
Where is that metadata.db table? A search on the calibre folder did not find anything.
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.)
Starson17 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
[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


All times are GMT -4. The time now is 04:36 AM.


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