utils

hotkeynet.utils.render_template(content: str, data: dict, verbose=True) str[source]

Render jinja2 string template

hotkeynet.utils.remove_empty_line(content: str) str[source]

Remove all full empty line

hotkeynet.utils.union_list(*lists: Iterable) list[source]

Union elements in all given lists.

hotkeynet.utils.intersection_list(*lists: Iterable) list[source]

Common elements in all given lists.

hotkeynet.utils.difference_list(lst: Iterable, *other_lsts: Iterable) list[source]

Remove all item in lst that exists in all other_lsts

hotkeynet.utils.set_to_list(st: set, reverse=False) list[source]

Convert a set to sorted list

hotkeynet.utils.has_duplicate(lst: list) bool[source]

Test if there is duplicate items in this list.