View Single Post
Old 06-11-2012, 07:19 PM   #39
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by sharky View Post
Thanks a lot for this excellent "tutorial"!

I tried to extend this a bit to my personal needs and have a question. What I want to do is generate collections for author-language combinations (i.e., one collection for all author books within one language).

I added a custom column with template "{authors} ({language})" and look-up name author_lang. Then, in Prefs - Plugins - Device Interface - SONY PRST1 - Customize I set #author_lang in the "comma separated list of .." field.

This seems to work quite well, except that the collection field when copying a book to the e-reader is now filled with: author (language) (author_lang), i.s.o. only author (language).

Any ideas how I can get rid of the trailing (author_lang)?
Yes... I believe it's default behaviour to have the name of a custom column in brackets when creating the Collection name. I don't think the same is true for a calibre standard column (e.g. tags or authors).

You need to visit Prefs - Tweaks and from the Tweaks list down the left-hand side find the one called Specify renaming rules for SONY collections. Then read the Help notes in the top panel (it's v-e-r-y l-o-n-g and detailed). I believe it exists for those who want to combine several categories into one Collection, or who want to create several different Collections and know which is which.

This is not a Tweak I use myself, but I think you may get what you want if you change the default
Code:
sony_collection_name_template = '{value}{category:| (|)}'
to
Code:
sony_collection_name_template = '{value}'
but you'll need to 'read and inwardly digest' in case I've got it wrong
jackie_w is offline   Reply With Quote