File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def main():
5353
5454 conv_res = doc_converter .convert (input_doc_path )
5555 conv_doc = conv_res .document
56- doc_filename = conv_res .input .file
56+ doc_filename = conv_res .input .file . name
5757
5858 # Save markdown with embedded pictures in original text
5959 md_filename = output_dir / f"{ doc_filename } -with-images-orig.md"
@@ -66,8 +66,12 @@ def main():
6666
6767 elif isinstance (element , TableItem ):
6868 for cell in element .data .table_cells :
69- cell .text = translate (text = element .text )
69+ cell .text = translate (text = cell .text )
7070
7171 # Save markdown with embedded pictures in translated text
7272 md_filename = output_dir / f"{ doc_filename } -with-images-translated.md"
7373 conv_doc .save_as_markdown (md_filename , image_mode = ImageRefMode .EMBEDDED )
74+
75+
76+ if __name__ == "__main__" :
77+ main ()
You can’t perform that action at this time.
0 commit comments