Template¶
Note
The documentation in this section is aimed at people wishing to contribute
to hubugs
, and can be skipped if you are simply using the tool from
the command line.
-
hubugs.template.
get_template
(__group, __name)¶ Fetch a Jinja template instance.
Jinja filter support¶
-
hubugs.template.
jinja_filter
(__func)¶ Simple decorator to add a new filter to Jinja environment.
-
hubugs.template.
colourise
(__text, fg=None, bg=None, **kwargs)¶ Colourise text.
Returns text untouched if colour output is not enabled
-
hubugs.template.
highlight
(__text, lexer='diff', formatter='terminal')¶ Highlight text with pygments.
Returns text untouched if colour output is not enabled
User interface support¶
-
hubugs.template.
display_bugs
(__bugs, __order, **extras)¶ Display bugs to users.
-
hubugs.template.
edit_text
(edit_type='default', data=None)¶ Edit data with external editor.
- Parameters
- Return type
- Returns
User supplied text
- Raises
EmptyMessageError
– No message givenEmptyMessageError
– Message not edited