Quote:
Originally Posted by ownedbycats
Small idea:
I can see several uses for an "add/remove specified amount" to Single Field Edit > Integer-type, e.g. a column tracking how many times the book's been read. Possibly can already done via template though.
I'm not planning anything requiring its use in the near future, but something to consider. 
|
As you said yourself, this is what the template option is for. That is why I don't think it is worth adding it. You can do it with the following one line:
Code:
program:
add(re(raw_field('#my_int_column'), 'None', 0), 1)
The number in
blue is the increment.
Update: As of calibre 5.13, template language supports several operator types including arithmetic operators. So people using calibre version >= 5.13 can replace the above code with this:
Code:
program:
re($$#testint,'None','0') + 1