From 5dc18df58557d0bc5564e6ad4cc59fb0d543bb4f Mon Sep 17 00:00:00 2001 From: xunbu Date: Tue, 5 Aug 2025 11:24:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E5=A2=9E=E5=8A=A0=E5=AF=B9do?= =?UTF-8?q?cx=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docutranslate/workflow/docx_workflow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docutranslate/workflow/docx_workflow.py b/docutranslate/workflow/docx_workflow.py index 91b5c37..9b7e248 100644 --- a/docutranslate/workflow/docx_workflow.py +++ b/docutranslate/workflow/docx_workflow.py @@ -50,7 +50,7 @@ class DocxWorkflow(Workflow[DocxWorkflowConfig, Document, Document], HTMLExporta docu = self._export(Docx2HTMLExporter(config)) return docu.content.decode() - def export_to_xlsx(self, _: ExporterConfig | None = None) -> bytes: + def export_to_docx(self, _: ExporterConfig | None = None) -> bytes: docu = self._export(Docx2DocxExporter()) return docu.content @@ -60,7 +60,7 @@ class DocxWorkflow(Workflow[DocxWorkflowConfig, Document, Document], HTMLExporta self._save(exporter=Docx2HTMLExporter(config), name=name, output_dir=output_dir) return self - def save_as_xlsx(self, name: str = None, output_dir: Path | str = "./output", + def save_as_docx(self, name: str = None, output_dir: Path | str = "./output", _: ExporterConfig | None = None) -> Self: self._save(exporter=Docx2DocxExporter(), name=name, output_dir=output_dir) return self