View Single Post
Old 07-31-2011, 03:05 PM   #1
Khan-Dam
Enthusiast
Khan-Dam began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jul 2011
Location: France
Device: iPad, Kindle 3, Kobo Glo, Kobo Aura
Question Some questions about my développement of sort_title

Hi again

Folowing m'y post on plugins forum https://www.mobileread.com/forums/sho...d.php?t=143460 i begin to work on this feature
It's very near to be finish but i have some questions :
  • I use tweaks [local_for_sorting] to Know if The hook must be call or not (if value is 'Fr' or not) this tweak are use for other things ?
  • I would use new tweaks, what The way to create new tweak with default value?
  • Now i put them in plugins tweaks part but i don't have default value and user must put them manualy!
  • In using tweaks is it necesary to use try except like in source of title_sort routine?

another thing i use a string to declare sort article like in tweak [title_sort_articles] = '^(A|The|An)\\s+'
i use french article and it's work find unless L' and D' i think it's a encoding problem butt i don't know how to solve that

my string is :
french_sort_articles = '^(Le|La|Les|L'|De|Du|Des|D'|A|Au|Aux|Ce|Ca|Ces)\\ s+'

another thing os there anybody here can lokk my modification to tell me if the writing i mad is correct or not

the last thing is does the sort process use accent letter like plain letter ( without accent) or not ?
thank you in advence to be patient with me i new in python and in calibre world

Last edited by Khan-Dam; 07-31-2011 at 03:14 PM.
Khan-Dam is offline   Reply With Quote