dotapatch.model

Module for the HTML structure.

class dotapatch.model.Html(title, template='default')[source]

Manages HTML output.

add_general(lines)[source]

Add lines to general section.

Parameters:lines (list[str]) – List of general changelog lines to be added into the general section
add_heroes(hero_dictionary)[source]

Add hero_dictionary to heroes section.

Note

{'dname': ['Change one.', 'Change two.']}

Parameters:hero_dictionary (dict) – Dictionary of heroes to be added into the heroes section
add_items(item_dictionary)[source]

Add item_dictionary to items section.

Note

{'dname': ['Change one.', 'Change two.']}

Parameters:item_dictionary (dict) – Dictionary of items to be added into the items section
close()[source]

Closes the HTML tags.

Warning

Must be called once!

get_content()[source]

Returns the whole HTML content.

Returns:content – Whole HTML content
Return type:str
get_dictionary_value(section)[source]

Returns the content for the given section.

Parameters:section (str) – The content section to be accessed, e.g. OPEN_GENERAL
Returns:content – Section content
Return type:str