09-01-2019, 04:33 PM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Jul 2018
Device: android phone
|
Custom sort template for authors and titles?
I suspect I may just be missing it, but is there a place I can put a template (or, failing that, some Python code) to customize how the Title sort and Author sort for books is computed?
Here's my situation: For authors, I've been adding a "tag" onto the author name for non-author names. For example Carlos Garcia & Bob Jones (tr) & Carol Smith (intro) meaning that the book was writting by Carlos Garcia and translated by Bob Jones, with an introduction written by Carol Smith. When sorting the book by author, I just want "Garcia, Carlos". Currently, it gives "Garcia, Carlos & Jones, Bob & Smith, Carol", so I know it's doing some processing, but I'd like to completely ignore any tagged names (unless there are no untagged names, in which case I'd like to use all that have the same tag as the first, usually "ed" for "editor").For titles, I've got a separate "#edition" column, and I'd like to add that and suppress any subtitle. That is, for
I'd like the sort title to be "The Title (2nd ed.)". I know that I can create computed columns, but that makes the UI tricky to use, since I can't edit the computed column directly. It would be easier if I could just add a value somewhere in the tweaks. Any ideas? |
09-01-2019, 10:35 PM | #2 |
Well trained by Cats
Posts: 30,405
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I just put those in the Title field:
title (ed 2) (title_sort ignores the ( ) stuff ) FWIW Calibre biases column sorts (IIRC default is 3 levels) Sort on your edition column, then sort on title If your device uses metadata: use the plugboard, just put {title} {#edition} with Title as the destination |
09-03-2019, 06:30 AM | #3 |
Groupie
Posts: 180
Karma: 299
Join Date: Jul 2010
Location: Brampton ON
Device: Kobo, Kindle3
|
You might refine theducks a tad by making the {#edition} segment {#edition:ifempty(NA)} instead. That leaves something there if there is no edition, rather than an extra space which can look a little off. I assume this is ONE of your plugboards, since not everything has an edition. But if you've gone to the extent of creating and maintaining edition fields, this extra step might be good.
|
Tags |
sorting |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using built-in template functions in a custom template function | ilovejedd | Library Management | 4 | 01-28-2018 12:20 PM |
Titles by dual Authors, Sort doesn't like. | Woodssi | Library Management | 3 | 06-30-2015 03:22 PM |
Manual Sort or Sort by custom column | Dethmaul | Marvin | 2 | 04-28-2014 11:54 AM |
setting authors.name to authors.sort | richardsugg | Library Management | 2 | 01-18-2013 03:50 PM |
Is it possible to sort a custom column like authors or title? | arspr | Library Management | 2 | 03-15-2011 04:44 PM |