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 05-13-2012, 02:34 PM   #1
lousignolo
Member
lousignolo began at the beginning.
 
lousignolo's Avatar
 
Posts: 11
Karma: 10
Join Date: Jul 2011
Location: France
Device: Archos 7 0b eReader
Set the list of words considered to be "articles" for sort strings

Hi.

There is something new in Preferences > Tweaks > Set the list of words considered to be "articles" for sort strings

I have the following lines:

# Set the list of words considered to be "articles" for sort strings

title_sort_articles = "^(A |The |An |Un |Une |L'|Le |La |Les |Des |Der |Die |Das |Ein |Eine )\\s*"

default_language_for_title_sort = Yes

per_language_title_sort_articles = {'ron': ('Un\\s+', 'O\\s+', 'Ni\xc5\x9fte\\s+'), 'tur': ('Bir\\s+',), 'por': ('A\\s+', 'O\\s+', 'Os\\s+', 'As\\s+', 'Um\\s+', 'Uns\\s+', 'Uma\\s+', 'Umas\\s+'), 'ita': ('Lo\\s+', 'Il\\s+', "L'", 'La\\s+', 'Gli\\s+', 'I\\s+', 'Le\\s+'), 'nld': ('De\\s+', 'Het\\s+', 'Een\\s+', "'n\\s+", "'s\\s+", 'Ene\\s+', 'Ener\\s+', 'Enes\\s+', 'Den\\s+', 'Der\\s+', 'Des\\s+', "'t\\s+"), 'spa': ('El\\s+', 'La\\s+', 'Lo\\s+', 'Los\\s+', 'Las\\s+', 'Un\\s+', 'Una\\s+', 'Unos\\s+', 'Unas\\s+'), 'fra': ('Le\\s+', 'La\\s+', "L'", 'Les\\s+', 'Un\\s+', 'Une\\s+', 'Des\\s+', 'De\\s+La\\s+', 'De\\s+', "D'"), 'ell': ('O\\s+', 'I\\s+', 'To\\s+', 'Ta\\s+', 'Tus\\s+', 'Tis\\s+', "'Enas\\s+", "'Mia\\s+", "'Ena\\s+", "'Enan\\s+"), 'eng': ('A\\s+', 'The\\s+', 'An\\s+'), 'swe': ('En\\s+', 'Ett\\s+', 'Det\\s+', 'Den\\s+', 'De\\s+'), 'deu': ('Der\\s+', 'Die\\s+', 'Das\\s+', 'Den\\s+', 'Ein\\s+', 'Eine\\s+', 'Einen\\s+', 'Dem\\s+', 'Des\\s+', 'Einem\\s+', 'Eines\\s+'), 'hun': ('A\\s+', 'Az\\s+', 'Egy\\s+'), 'afr': ("'n\\s+", 'Die\\s+')}

In the past, I had only :

# Set the list of words considered to be "articles" for sort strings

title_sort_articles = "^(A |The |An |Un |Une |L'|Le |La |Les |Des |Der |Die |Das |Ein |Eine )\\s*"

and, at that time, I could sort book titles after the article. Now Calibre refuses to sort < Le chapelet de jade > as < chapelet de jade, Le > and the same thing for all French titles. There is no problem for English articles

All existing French titles remain with the former title sort, in the Title sort zone, but now shown with a red background, and if I try to click on the arrow, between Title zone and Title sort zone, gives a Title sort identical to the Title on the left:
(Title) La charrette bleue >>> (Title sort) La charrette bleue

That's bad because I have hundreds of French books which have a right sort and now are shown as having a bad one, plus I can't add no other correct title sort. What can I do? I tried to remove the new lines but it doesn't matter.

Thanks for any help.

Another question: if this can't be changed, is there an easy way to come back to a former release of Calibre (when I had no p^roblem with Title sort)? I know where a re the former releases of Calibre on Sourceforge, but can I remove the present release and install the former one?

Last edited by lousignolo; 05-13-2012 at 03:00 PM.
lousignolo is offline   Reply With Quote
Old 05-13-2012, 04:01 PM   #2
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 6,965
Karma: 43999669
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
Do you want to set default_language_for_title_sort to fra maybe?
PeterT is offline   Reply With Quote
 
Enthusiast
Old 05-13-2012, 04:10 PM   #3
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,846
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
default_language_for_title_sort = None

Yes is not a legitimate alternate Language

If your System language is other than: fra you might consider that as the alternate value
theducks is offline   Reply With Quote
Old 05-13-2012, 04:26 PM   #4
lousignolo
Member
lousignolo began at the beginning.
 
lousignolo's Avatar
 
Posts: 11
Karma: 10
Join Date: Jul 2011
Location: France
Device: Archos 7 0b eReader
Quote:
Originally Posted by theducks View Post
default_language_for_title_sort = None

Yes is not a legitimate alternate Language

If your System language is other than: fra you might consider that as the alternate value
Is there explanation anywhere for this tweak?

The problem, at the beginning, was the same with default_language_for_title_sort = None

I am looking for the way, with this line and the default line title_sort_articles = '^(A|The|An)\\s+' to sort French titles, as I could before, for six months (thread 'Words considered as articles for title sort strings', in the same forum, see: chaley's answer, 07-22-2011, 05:31 PM):
title_sort_articles = "^(A |The |An |Un |Une |L'|Le |La |Les |Des )\\s*"

With default tweak values :

# Set the list of words considered to be "articles" for sort strings

title_sort_articles = '^(A|The|An)\\s+'

default_language_for_title_sort = None

per_language_title_sort_articles = {'ron': ('Un\\s+', 'O\\s+', 'Ni\xc5\x9fte\\s+'), 'tur': ('Bir\\s+',), 'por': ('A\\s+', 'O\\s+', 'Os\\s+', 'As\\s+', 'Um\\s+', 'Uns\\s+', 'Uma\\s+', 'Umas\\s+'), 'ita': ('Lo\\s+', 'Il\\s+', "L'", 'La\\s+', 'Gli\\s+', 'I\\s+', 'Le\\s+'), 'nld': ('De\\s+', 'Het\\s+', 'Een\\s+', "'n\\s+", "'s\\s+", 'Ene\\s+', 'Ener\\s+', 'Enes\\s+', 'Den\\s+', 'Der\\s+', 'Des\\s+', "'t\\s+"), 'spa': ('El\\s+', 'La\\s+', 'Lo\\s+', 'Los\\s+', 'Las\\s+', 'Un\\s+', 'Una\\s+', 'Unos\\s+', 'Unas\\s+'), 'fra': ('Le\\s+', 'La\\s+', "L'", 'Les\\s+', 'Un\\s+', 'Une\\s+', 'Des\\s+', 'De\\s+La\\s+', 'De\\s+', "D'"), 'ell': ('O\\s+', 'I\\s+', 'To\\s+', 'Ta\\s+', 'Tus\\s+', 'Tis\\s+', "'Enas\\s+", "'Mia\\s+", "'Ena\\s+", "'Enan\\s+"), 'eng': ('A\\s+', 'The\\s+', 'An\\s+'), 'swe': ('En\\s+', 'Ett\\s+', 'Det\\s+', 'Den\\s+', 'De\\s+'), 'deu': ('Der\\s+', 'Die\\s+', 'Das\\s+', 'Den\\s+', 'Ein\\s+', 'Eine\\s+', 'Einen\\s+', 'Dem\\s+', 'Des\\s+', 'Einem\\s+', 'Eines\\s+'), 'hun': ('A\\s+', 'Az\\s+', 'Egy\\s+'), 'afr': ("'n\\s+", 'Die\\s+')}

It doesn't match, and Calibre doesn't accept fra as a value in default_language_for_title_sort line...

I'm sure there is an easy solution, but which solution?

I think I found the right way: this tweak only matches if the Languages zone, in the Edit metadat window, is set as 'French'. But I found no explanation about this

Last edited by lousignolo; 05-13-2012 at 04:44 PM.
lousignolo is offline   Reply With Quote
Old 05-13-2012, 05:00 PM   #5
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,846
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Somewhere else (not a tweak),
there was an explanation that Calibre assumes all books without a language set, are the of system language. This is a basic Calibre (added in 8.x?) functionality.
theducks is offline   Reply With Quote
Old 05-13-2012, 05:03 PM   #6
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,846
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
You need to put strings in single quotes: 'fra'
theducks is offline   Reply With Quote
Old 05-13-2012, 05:14 PM   #7
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 6,965
Karma: 43999669
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
I thought the tweak was documented within the Preferences | Tweaks area

Quote:
Set the list of words that are to be considered 'articles' when computing the
title sort strings. The articles differ by language. By default, calibre uses
a combination of articles from English and whatever language the calibre user
interface is set to. In addition, in some contexts where the book language is
available, the language of the book is used. You can change the list of
articles for a given language or add a new language by editing
per_language_title_sort_articles. To tell calibre to use a language other
than the user interface language, set, default_language_for_title_sort. For
example, to use German, set it to 'deu'. A value of None means the user
interface language is used. The setting title_sort_articles is ignored
(present only for legacy reasons).
So to me it says, that Calibre will use English PLUS whatever language Calibre is running in; and that you can force it to use an additional language by setting default_language_for_title_sort to (for instance) 'deu' or 'fra'.
PeterT is offline   Reply With Quote
Old 05-13-2012, 05:18 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,846
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
PeterT
What the tweak does not mention, is the Books Language must be set for it to be effective for other than the default language.
Makes sense: How is the tweak to know when to use the rule for alternate languages'
theducks is offline   Reply With Quote
Old 05-13-2012, 06:54 PM   #9
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 6,965
Karma: 43999669
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
Quote:
Originally Posted by theducks View Post
PeterT
What the tweak does not mention, is the Books Language must be set for it to be effective for other than the default language.
Makes sense: How is the tweak to know when to use the rule for alternate languages'
My reading of the option is that it will always use English plus the UI language
Quote:
By default, calibre uses a combination of articles from English and whatever language the calibre user interface is set to.
; and it CAN use the language of the book as well.
Quote:
In addition, in some contexts where the book language is available, the language of the book is used.
PeterT 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
How to set "View Sections & Articles" kindleren Calibre 6 03-06-2013 06:53 AM
Kindle Fire: also missing "section/articles" in all news mkgtu Devices 3 11-21-2011 10:14 AM
Words considered as articles for title sort strings lousignolo Library Management 6 07-22-2011 05:36 PM
Have you considered using the new "fixed format" from Apple? yuxi_kelly ePub 3 02-10-2011 08:26 AM
How to remove "Fully read" books from "Last Open" list? pjeanetta PocketBook 4 12-08-2010 10:30 AM


All times are GMT -4. The time now is 12:56 AM.


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