<s> from . import docx , conversion , options , images , underline <EOL> from . raw_text import extract_raw_text_from_element <EOL> from . docx . style_map import write_style_map , read_style_map <EOL> __all__ = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> def convert_to_html ( * args , ** kwargs ) : <EOL> return convert ( * args , output_format = "<STR_LIT:html>" , ** kwargs ) <EOL> def convert_to_markdown ( * args , ** kwargs ) : <EOL> return convert ( * args , output_format = "<STR_LIT>" , ** kwargs ) <EOL> def convert ( fileobj , transform_document = None , id_prefix = None , ** kwargs ) : <EOL> if transform_document is None : <EOL> transform_document = lambda x : x <EOL> if kwargs . get ( "<STR_LIT>" ) is None : <EOL> kwargs [ "<STR_LIT>" ] = read_style_map ( fileobj ) <EOL> return options . read_options ( kwargs ) . bind ( lambda convert_options : <EOL> docx . read ( fileobj ) . map ( transform_document ) . bind ( lambda document : <EOL> conversion . convert_document_element_to_html ( <EOL> document , <EOL> id_prefix = id_prefix , <EOL> ** convert_options <EOL> ) <EOL> ) <EOL> ) <EOL> def extract_raw_text ( fileobj ) : <EOL> return docx . read ( fileobj ) . map ( extract_raw_text_from_element ) <EOL> def embed_style_map ( fileobj , style_map ) : <EOL> write_style_map ( fileobj , style_map ) <EOL> def read_embedded_style_map ( fileobj ) : <EOL> return read_style_map ( fileobj ) </s>
