06-20-2023, 11:19 AM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2023
Device: Kindle Paperwhite 4
|
Unreliabilities with title_sort in AZW3?
Hello, this is my first post, so let me start thanking everyone involved with Calibre development for the amazing, titanic job!
I am trying to set the title_sort metadata parameter for AZW3 ebooks (starting from EPUB), but the results have proven extremely weird. (Other fields and EPUB work as expected.) With Python API (calibre.ebooks.metadata.meta set_metadata()): This is ignored. (Works in EPUB. Works for other fields in AZW3.) With ebook-meta --title-sort: This is ignored. (Works in EPUB. Works for other fields in AZW3.) With <dc:title opf:file-as="???">: This is recognized in EPUB, but is not transferred to AZW3 (using ebook-convert). With <meta name="calibre:title_sort">: This works SOMETIMES using ebook-convert. This never works using ebook-convert --read-metadata-from-opf. This whole thing is so weird that I really don’t know how to approach it. I will gladly file a bug report if you think it qualifies as a bug. I can also take my thread somewhere else, if necessary. (?) Do you have any ideas? Thanks in advance! |
06-20-2023, 02:41 PM | #2 |
Grand Sorcerer
Posts: 6,542
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
Kindle ebook formats have author and title fields but no separate author sort or title sort.
The MobileRead wiki has an article that shows the actual metadata that can be present in KF8 (azw3) format. |
Advert | |
|
06-20-2023, 03:11 PM | #3 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2023
Device: Kindle Paperwhite 4
|
Hello jhowell,
Thanks so much for your reply! I can’t square this info with the fact that the <meta name="calibre:title_sort"> + ebook-convert pipeline does sometimes (maybe less than half the cases) produce AZW3 output with a title_sort field. I do now know how to include the author_sort information in the author field (using a "Surname, Name" format) for Kindle. Does that mean that I can/should include the title_sort information somehow in the title field, also? Still, this doesn’t explain the cases above, where title_sort does work in AZW3. Or maybe none of this really makes any difference for me? I am trying to get my Kindle (PW4) to display the books in a certain order. This whole quest only makes sense if Kindle is actually able to do so. Sorry if I am being thick, this has been a very long journey and this last stretch really goes over my head. |
06-20-2023, 04:16 PM | #4 |
Grand Sorcerer
Posts: 6,542
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
Kindles create their own title sort based on the title set in the book. It is not something you can control by setting a title sort field. For example on my Kindle the word "The" is ignored as the first word of a title for sorting purposes.
On the other hand authors are sorted by whatever is present in the author field, which is usually in "lastname, firstname" format. However is it sometimes, but not always, displayed as "firstname lastname" on the Kindle. |
06-20-2023, 05:52 PM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2023
Device: Kindle Paperwhite 4
|
OK, I can confirm that this is indeed the case with my Kindle, even for German (Das, Ein, etc.) and Spanish (El, La, Una, etc.)!
This still leaves open the mystery of the cases where title_sort is present in AZW3, but I won’t dig any deeper into this. Since Kindle does its internal black magic thing, it makes absolutely no sense for me trying to coax out some special custom behavior. Therefore, a HUGE THANK YOU! This was incredibly quick and helpful! |
Advert | |
|
06-20-2023, 07:22 PM | #6 |
Grand Sorcerer
Posts: 6,542
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
I am curious about where you are seeing that. Are you perhaps relying on the calibre editor? That program shows an EPUB equivalent of an AZW3 book, not the actual contents of the AZW3 file.
|
06-21-2023, 07:04 AM | #7 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2023
Device: Kindle Paperwhite 4
|
As a preparation for this post, I researched the AZW3/title_sort situation as best as I could: I processed my whole EPUB collection with the 5 methods mentioned in my first message and analyzed the resulting AZW3 metadata fields.
In the cases where OPF contains <meta name="calibre:title_sort" content="???"/>, using ebook-convert (Linux command-line tool), the resulting AZW3 book contains a title_sort field in less than half the cases. (When using the --read-metadata-from-opf option, this field is never read/generated.) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Inconsistent use of The (title_sort) | MeBlue | Library Management | 5 | 05-08-2020 07:29 AM |
Title_sort problem | Phssthpok | Library Management | 3 | 10-10-2018 09:52 AM |
title_sort for some books. | duraton | Library Management | 1 | 09-16-2017 12:47 PM |
Articles with apostrophes in title_sort | riki | Calibre | 3 | 08-13-2011 01:56 PM |
Using author_sort, title_sort names | meme | Development | 6 | 02-23-2011 01:41 PM |