bin.docxtotei

Module Contents

bin.docxtotei.__author__ = Dulip Withanage[source]
bin.docxtotei.__email__ = dulip.withanage@gmail.com[source]
class bin.docxtotei.DocxToTei(gv)[source]

Bases: debug.Debuggable

saxon_doc_to_tei(self)[source]

Creates the appropriate java command to run Saxon @return: a string to run on the command line

saxon_omml_to_mml(self)[source]

Creates the appropriate java command to run Saxon @return: a string to run on the command line

handle_wmf(self)[source]

Calls unoconv to convert wmf images into png format. This method has a hard limit of 30 images.

@return: False if fails (more than 30 images), True otherwise

clean_proprietary(self)[source]
run(self, extract, run_proprietary, tei=False)[source]

This method converts from docx to TEI. It creates the necessary output folders, optionally extracts the file and runs the Saxon process necessary to conduct the transform @param extract: whether or not to extract a docx file. True to extract, False to work on a pre-extracted folder @param run_proprietary: whether or not to run proprietary math transforms