module documentation
Module for final generation of the translated website Usage:
- from bootstraparse.modules.export import ExportManager, ExportRequest, ExportResponse
- rqs = ExportRequest("strucural_elements", "div", "optionals", {"id": "my_id", "class": "my_class"})
- rsp = ExportResponse("start_string", "end_string")
- em = ExportManager(config_file, template_file)
- em(ExportRequest()) -> ExportResponse()
| Class | |
Transforms output form context manager into final, printable versions of the containers. |
| Class | |
Transforms ExportRequest tuples to ExportResponse tuples with the config-provided appropriate markup. |
| Function | format |
Function handling parser output optional object, splitting it between html_insert and class_insert on one hand and var on the other hand. :param optionals: SplitToken namedtuple :type optionals: syntax... |
| Variable | |
Named tuple containing all necessary information to proceed with the final output. |
| Variable | |
Undocumented |
def format_optionals(optionals):
Function handling parser output optional object, splitting it between html_insert and class_insert on one hand and var on the other hand. :param optionals: SplitToken namedtuple :type optionals: syntax.OptionalToken :return: The formatted optionals (With the pretty whitespace) :rtype: str