05-13-2012, 02:34 PM | #1 |
Member
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. |
05-13-2012, 04:01 PM | #2 |
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Do you want to set default_language_for_title_sort to fra maybe?
|
Advert | |
|
05-13-2012, 04:10 PM | #3 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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 |
05-13-2012, 04:26 PM | #4 | |
Member
Posts: 11
Karma: 10
Join Date: Jul 2011
Location: France
Device: Archos 7 0b eReader
|
Quote:
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. |
|
05-13-2012, 05:00 PM | #5 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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. |
Advert | |
|
05-13-2012, 05:03 PM | #6 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You need to put strings in single quotes: 'fra'
|
05-13-2012, 05:14 PM | #7 | |
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
I thought the tweak was documented within the Preferences | Tweaks area
Quote:
|
|
05-13-2012, 05:18 PM | #8 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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' |
05-13-2012, 06:54 PM | #9 | |||
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Quote:
Quote:
Quote:
|
|||
|
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 |