![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2025
Location: Pennsylvania, USA
Device: Calibre
|
Sort options for Publisher field similar to Author field?
One of the tweaks that can by highly customized in Calibre is how to sort names in the Author column. What titles/honoraries to ignore, ignoring leading articles, etc.
I would like to be able to implement this last feature, ignoring leading articles (a/an, the) in the Publisher field's names as well. Currently names like "The Atlantic" do not ignore the leading article and sort as starting with "T" and not starting with "A". But this can be done in the Author field. My current workaround is to give names like "Atlantic, The". But this is clunky and unattractive. Any pointers as to how to implement this feature? Are there plug-ins which do this? Thanks in advance, T |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,241
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Create a custom column built from other columns, then use a template to format the publisher name however you like.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2025
Location: Pennsylvania, USA
Device: Calibre
|
![]() |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,358
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The template function swap_around_articles() should do what you want. If putting the article on the end is all you want then this template should do
Code:
{publisher:swap_around_articles()} If you want a comma instead of a semicolon then this template should do: Code:
{publisher:'re(swap_around_articles($, ','), ';', ',')'} Last edited by chaley; 05-25-2025 at 06:04 AM. Reason: change "formatter function" to "template function" |
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2025
Location: Pennsylvania, USA
Device: Calibre
|
Quote:
I think I will need to write/extend a template to format the entry, like Kovid mentioned. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,358
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
When Kovid suggested a custom column he was suggesting exactly what I showed you. Instead of sorting on Publisher you sort on the custom column to get the order you want. The Publisher field remains "The Atlantic". The custom field is "Atlantic; The". You don't need to show the custom column in the book list to sort on it. Hide the custom column then use the "sort by" tool to sort the library. If you do this often enough then you can use the Action Chains plugin to create a shortcut to do the sort. I could in theory add a "sort template" to custom columns, which would give you a mechanism to sort custom columns on something different from what you see. I'm not convinced the added functionality is worth the development effort. I'm also not sure the performance would be adequate. |
||
![]() |
![]() |
![]() |
#7 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2025
Location: Pennsylvania, USA
Device: Calibre
|
Quote:
![]() For other users' reference: I kept the column I made above, and hid it. Then just added the Sort by drop down tool to my toolbar. Selecting my new invisible column from that drop down did the trick. ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
on main screen the field AUTHOR is filled in but AUTHOR SORT is blank | xenduro | Calibre | 7 | 12-30-2024 08:06 PM |
Finding books with author's name in the publisher field | ownedbycats | Library Management | 2 | 05-15-2022 06:38 PM |
Author field update and author sort | derangedhermit | Calibre | 4 | 01-23-2013 04:10 AM |
Author sort field with several authors | vRiki | Library Management | 6 | 11-27-2012 02:05 PM |
Author Sort Field in Edit Meta Information Window | RoninTech | Calibre | 4 | 11-13-2008 04:08 AM |