Parser#

class ansys.scade.almgw_msoffice.msword.Parser#

Parser for MS Word documents (DOCX).

Initialize the parser.

Overview#

add_heading

Add a new section to the document.

add_req_id

Add a new requirement to the document.

append_req_text

Append text to the current requirement’s description.

parse

Build the document model from a MS Word document.

Import detail#

from ansys.scade.almgw_msoffice.msword import Parser

Attribute detail#

Parser.anonymous_req_count = 0#
Parser.current_req = None#
Parser.requirements#
Parser.sections = []#

Method detail#

Parser.add_heading(level: int, text: str)#

Add a new section to the document.

Parser.add_req_id(id: str)#

Add a new requirement to the document.

Parser.append_req_text(text: str)#

Append text to the current requirement’s description.

Parser.parse(req_doc: ansys.scade.pyalmgw.documents.ReqDocument, req_style: str, text_style: str)#

Build the document model from a MS Word document.