View Single Post
Old 11-10-2012, 05:25 AM   #1
Pepin33
Zealot
Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.
 
Posts: 109
Karma: 419
Join Date: Aug 2012
Location: Spain
Device: Kindle Touch
Red face Help with template language

I'm trying to make a saving template in Calibre. I want to get an identifier from my books and format it to remove left zeros.

For example, if identifier in a book is 0000123, I want my book be saved as "123".
Identifiers are always 8 digit numbers, filled with zeros (00000001, 0000002, etc).

I'm trying to use this template: {identifiers:select(my_id):G}, but I get an error saying "my_id" is not a number, but a string.

I was looking at templates languages, but I can't find any function to convert a string to an integer. Anybody can help me?

Last edited by Pepin33; 11-10-2012 at 05:36 AM.
Pepin33 is offline   Reply With Quote