mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
c19c2fb0cf
@ -88,14 +88,15 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
in template processing. You use a stored template in another template as
|
in template processing. You use a stored template in another template as
|
||||||
if it were a template function, for example 'some_name(arg1, arg2...)'.</p>
|
if it were a template function, for example 'some_name(arg1, arg2...)'.</p>
|
||||||
|
|
||||||
<p>Stored templates must use General Program Mode -- they must
|
<p>Stored templates must use General Program Mode or Python Template
|
||||||
either begin with the text '{0}' or be {1}. You retrieve arguments
|
Mode -- they must begin with the text '{0}' or '{1}'. You retrieve
|
||||||
passed to a GPM stored template using the '{2}()' template function, as
|
arguments passed to a GPM stored template using the '{2}()' template
|
||||||
in '{2}(var1, var2, ...)'. The passed arguments are copied to the named
|
function, as in '{2}(var1, var2, ...)'. The passed arguments are copied
|
||||||
variables. Arguments passed to a Python template are in the '{2}'
|
to the named variables. Arguments passed to a Python template are in the
|
||||||
parameter. Arguments are always strings.</p>
|
'{2}' attribute (a list) of the '{3}' parameter. Arguments are always
|
||||||
|
strings.</p>
|
||||||
|
|
||||||
<p>For example, this stored template checks if any items are in a
|
<p>For example, this stored GPM template checks if any items are in a
|
||||||
list, returning '1' if any are found and '' if not.</p>
|
list, returning '1' if any are found and '' if not.</p>
|
||||||
<p>
|
<p>
|
||||||
Template name: items_in_list<br>
|
Template name: items_in_list<br>
|
||||||
@ -115,7 +116,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
See the template language tutorial for more information.</p>
|
See the template language tutorial for more information.</p>
|
||||||
</p>
|
</p>
|
||||||
''')
|
''')
|
||||||
self.st_textBrowser.setHtml(help_text.format('program:', 'python templates', 'arguments'))
|
self.st_textBrowser.setHtml(help_text.format('program:', 'python:', 'arguments', 'context'))
|
||||||
self.st_textBrowser.adjustSize()
|
self.st_textBrowser.adjustSize()
|
||||||
self.st_show_hide_help_button.clicked.connect(self.st_show_hide_help)
|
self.st_show_hide_help_button.clicked.connect(self.st_show_hide_help)
|
||||||
self.st_textBrowser_height = self.st_textBrowser.height()
|
self.st_textBrowser_height = self.st_textBrowser.height()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user