View Single Post
Old 06-27-2018, 06:40 PM   #802
Pichael
Junior Member
Pichael will become famous soon enoughPichael will become famous soon enoughPichael will become famous soon enoughPichael will become famous soon enoughPichael will become famous soon enoughPichael will become famous soon enough
 
Posts: 6
Karma: 650
Join Date: Jun 2018
Device: Paperwhite (2013), Oasis (2019)
Quote:
Originally Posted by chaley View Post
This Template Program Mode template does the job. It distinguishes between integer and floating point series numbers, picking different formatting. For floating point numbers it removes any trailing zeros after the number is formatted.
Code:
{series_index:'contains($, '\.', re(format_number($, '0>5.2f'), '0*$', ''), format_number($, '0>2d'))'}
Sorry for this completely novice question, but I just learnt about metadata plugboards today and found this post.
It's almost exactly as I want my books to appear on my Kindle.

One thing I would like though is brackets around the series number. I think the code is |[|] but I am not sure where to add it to the above template. I thought I had it, but my books end up with plugboard errors in the title when they arrive on my Kindle.

Thanks for any help.

Edit: Nevermind I figured it out myself. I swear I tried this already but it didn't work. I must've messed something up the first time.

Code:
{series_index:'contains($, '\.', re(format_number($, '0>5.2f'), '0*$', ''), format_number($, '0>2d'))'|[|]} {title}
Edit2: Hmm that didn't turn out how I wanted it to.

Now my series looks like:

[01] Book
[02] Book
[03.5] Book
[03] Book

How do I get it to sort it properly so 3.5 is after 3?

Last edited by Pichael; 06-27-2018 at 07:22 PM. Reason: Figured it out.
Pichael is offline   Reply With Quote