Quote:
Originally Posted by BeccaPrice
but it's not 02s, it's 0>2s - what is the greater-than sign for?
let's say i want the series name first,number, and then title of the book. would the rule then read:
mobi:any device = ([{series:|(| }{series_index:0>2s||)}{title}] -> title)
and I'm not sure what the last ->title means, or why it's out of the square brackets.
|
Firstly, the "-> title" isn't a part of the rule. If you look at how you define a metadata plugboard, there are three parts to it: the format/device, the rule itself, and which metadata field the result should be sent to. The "-> title" is just a way of saying "place the output in the title field". It's not a part of the rule. Look at how you enter a plugboard in Calibre, and it'll become clear.
The "0>2s" is a Python formatting description and means:
0: Use a "0" as a fill character.
>: Right align the output in the available space.
2: Make the field 2 characters wide.
s: Display the result as a string.
Given that there's a fill character, the ">" is, in fact, redundant. Had there not been a fill character, though, it makes, say, a "7" display as " 7" rather than as "7 ".
Hope this helps.