View Single Post
Old 12-30-2024, 01:20 PM   #1045
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Magic815 View Post
But the Kindle still sorts it like this:

As noted in that other post, I wonder if there is some overarching issue with how the Kindle device sorts that? If I had to choose between the above latest view I'm getting vs all my series being 01.00, 02.00, etc. - I think I can live with the 0X.5 entries being slightly out of place fo the very small handful of times they even exist.
It appears that the kindle is doing some kind of numeric sorting, but ignoring the decimal point and later digits. In other words, it is sorting whole numbers, not fractional numbers. This is implied by the example in your post and your example in post 1042 where the list is sorted by whole number, ignoring leading zeros.
Quote:
But if anyone knows of a way to present the above titles as I've got them (without extraneous trailing zeros) - with proper sorting on Kindle - definitely let me know!
I don't have a kindle and can't test this, but it could be that if you put a decimal point after the whole numbered indices then they would sort correctly. By that I mean:
Quote:
The Stormlight Archive #01. - Title
The Stormlight Archive #02. - Title
The Stormlight Archive #02.5 - Title
The Stormlight Archive #03. - Title
The Stormlight Archive #03.5 - Title
The Stormlight Archive #04. - Title
The Stormlight Archive #05. - Title
This template gives you the above:
Code:
program:
	if '\.' in $series_index then
		template('{series}{series_index:0>4.1f| #| - }{title}')
	else
		template('{series}{series_index:0>2d| #|. - }{title}')
	fi
Note the addition of the period in the suffix used for series indices that are whole numbers.

Your example cited above implies that this might work as well:
Quote:
The Stormlight Archive #1. - Title
The Stormlight Archive #2. - Title
The Stormlight Archive #2.5 - Title
The Stormlight Archive #3. - Title
The Stormlight Archive #3.5 - Title
The Stormlight Archive #4. - Title
The Stormlight Archive #5. - Title
This template gives you that:
Code:
program:
	if '\.' in $series_index then
		template('{series}{series_index:.1f| #| - }{title}')
	else
		template('{series}{series_index:d| #|. - }{title}')
	fi
chaley is offline   Reply With Quote