def insert(self): if DEBUG: print('Adding unimplemented...') err_msg = f'"{self.section.type}" is not implemented' + \ ' in Docx yet. If required, use PDF instead' utils.insert_error(self.cell_object, err_msg)
def invoke(cell_object, section): if section.type != MD_TYPE_QUOTE: err_msg = 'Called blockquote but not blockquote (quote) -' + \ f' [{section}]' return utils.insert_error(cell_object, err_msg) QuoteWrapper(cell_object, section).wrap()
def invoke(cell_object, section): if section.type != 'column_chart': err_msg = 'Called column_chart but not column_chart - ' + \ f'[{section}]' return utils.insert_error(cell_object, err_msg) ColumnChartElement(cell_object, section).insert()
def invoke(cell_object, section): if section.type != 'list': err_msg = f'Called list but not list - [{section}]' return utils.insert_error(cell_object, err_msg) section.extra['list_style'] = True TableElement(cell_object, section).insert()
def invoke(cell_object, section): if section.type != 'image': err_msg = f'Called image but not image - [{section}]' return utils.insert_error(cell_object, err_msg) has_run(cell_object) ImageElement(cell_object, section).insert()
def invoke(cell_object: CellObject, section: Section, invoked_from_wrapper=False): if section.type != 'elem_list': err_msg = f'Called elem_list but not elem_list - [{section}]' return utils.insert_error(cell_object, err_msg) ElemListWrapper(cell_object, section).wrap( invoked_from_wrapper=invoked_from_wrapper)
def invoke(cell_object: CellObject, section: Section, invoked_from_wrapper=False): if section.type != 'markdown': err_msg = f'Called markdown but not markdown - [{section}]' return utils.insert_error(cell_object, err_msg) MarkdownWrapper(cell_object, section).wrap( invoked_from_wrapper=invoked_from_wrapper)
def invoke(cell_object: CellObject, section: Section, invoked_from_wrapper=False): if section.type != 'items_section': err_msg = f'Called items_section but not items_section - [{section}]' return utils.insert_error(cell_object, err_msg) ItemsSectionWrapper( cell_object, section).wrap(invoked_from_wrapper=invoked_from_wrapper)
def invoke(cell_object, section, apply_styling=True) -> None: if section.type not in ['header', 'paragraph', 'span', 'text', 'p']: err_msg = f'Called text but not text - [{section}]' return utils.insert_error(cell_object, err_msg) # Used when called directly from a text element (in the json) # So we have to apply the style manually. if apply_styling: has_run(cell_object) apply_style(cell_object, section) TextElement(cell_object, section).insert()
def invoke(cell_object, section): if section.type != MD_TYPE_ORDERED_LIST: err_msg = f'Called ol but not ol - [{section}]' return utils.insert_error(cell_object, err_msg) UlWrapper(cell_object, section).wrap()
def invoke(cell_object, section): if section.type != 'list': err_msg = f'Called list but not list - [{section}]' return utils.insert_error(cell_object, err_msg) ListElement(cell_object, section).insert()
def invoke(cell_object, section) -> None: if section.type != 'placeholder': err_msg = f'Called placeholder but not placeholder - [{section}]' return utils.insert_error(cell_object, err_msg) PlaceHolderElement(cell_object, section).insert()
def invoke(cell_object, section): if section.type != 'number': err_msg = f'Called number but not number - [{section}]' return utils.insert_error(cell_object, err_msg) NumberElement(cell_object, section).insert()
def invoke(cell_object, section) -> None: if section.type != MD_TYPE_IMAGE: err_msg = f'Called image but not image - [{section}]' return utils.insert_error(cell_object, err_msg) ExternalImageElement(cell_object, section).insert()
def invoke(cell_object, section): if section.type != MD_TYPE_CODE: err_msg = f'Called code but not code - [{section}]' return utils.insert_error(cell_object, err_msg) CodeWrapper(cell_object, section).wrap()
def invoke(cell_object, section): if section.type != 'table': err_msg = f'Called table but not table - [{section}]' return utils.insert_error(cell_object, err_msg) TableElement(cell_object, section).insert()
def invoke(cell_object, section): if section.type != 'duration': err_msg = f'Called duration but not duration - [{section}]' return utils.insert_error(cell_object, err_msg) DurationElement(cell_object, section).insert()
def invoke(cell_object, section) -> None: if section.type != 'header': err_msg = f'Called header but not header - [{section}]' return utils.insert_error(cell_object, err_msg) HeaderElement(cell_object, section).insert()
def invoke(cell_object, section): if section.type != 'bar_chart': err_msg = f'Called bar_chart but not bar_chart - [{section}]' return utils.insert_error(cell_object, err_msg) BarChartElement(cell_object, section).insert()
def invoke(cell_object, section) -> None: if section.type not in ['a']: err_msg = f'Called link but not link - [{section}]' return utils.insert_error(cell_object, err_msg) LinkElement(cell_object, section).insert()
def invoke(cell_object, section): if section.type != MD_TYPE_LIST_ITEM: err_msg = f'Called li but not li - [{section}]' return utils.insert_error(cell_object, err_msg) LiWrapper(cell_object, section).wrap()
def invoke(cell_object, section): if section.type != MD_TYPE_HORIZONTAL_LINE: err_msg = f'Called hr but not hr - [{section}]' return utils.insert_error(cell_object, err_msg) HorizontalLineElement(cell_object, section).insert()
def invoke(cell_object, section): if section.type != 'trend': err_msg = f'Called trend but not trend - [{section}]' return utils.insert_error(cell_object, err_msg) TrendElement(cell_object, section).insert()
def invoke(cell_object, section) -> None: if section.type != 'date': err_msg = f'Called date but not date - [{section}]' return utils.insert_error(cell_object, err_msg) DateElement(cell_object, section).insert()