Quote:
Originally Posted by ownedbycats
Question: When using a stored template that returns 'True' if it matches certain criteria (psuedobools), I noticed these work the same:
Code:
program:
if stored_returnstrueifvalid() == 'True' then 'output' fi
Code:
program:
if stored_returnstrueifvalid() then 'output' fi
When do I need I keep the "== 'True'" bit?
|
A conditional expression is False if it evaluates to the empty string, otherwise it is True. As such you don't need the == 'True' part if the stored template return that or the empty string.
Quote:
|
Also, is there any good way to test two templates getting same results on a set of books aside from shuffling it between the tester and Notepad? I don't believe there's a way to have two tester instances open.
|
Some ways:
- You could use calibre-debug -g to have a cmd window, then use the template print() to show values in that window.
- If they are stored templates then you can compare their results in a third template.
- You can create a few extra composite columns and compare the values stored in the columns.