From 6ab3278481f4cb758c8d99be1515a5f8cf8323a2 Mon Sep 17 00:00:00 2001 From: xunbu Date: Thu, 24 Jul 2025 17:32:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 + docutranslate/agents/markdown_agent.py | 5 +- docutranslate/converter/converter.py | 6 - docutranslate/converter/converter_docling.py | 6 - docutranslate/converter/converter_mineru.py | 6 - docutranslate/static/index.html | 1588 +----------------- 6 files changed, 13 insertions(+), 1608 deletions(-) diff --git a/README.md b/README.md index b1a9166..ea50a30 100644 --- a/README.md +++ b/README.md @@ -313,3 +313,13 @@ translater = FileTranslater(base_url="", ### Filetranslater的解析缓存机制 工具默认会缓存最近10条(全局)解析记录存于内存中,可以通过`DOCUTRANSLATE_CACHE_NUM`环境变量进行修改 + +## Star History + + + + + + Star History Chart + + \ No newline at end of file diff --git a/docutranslate/agents/markdown_agent.py b/docutranslate/agents/markdown_agent.py index d93a545..c5ec9e1 100644 --- a/docutranslate/agents/markdown_agent.py +++ b/docutranslate/agents/markdown_agent.py @@ -20,7 +20,7 @@ class MDRefineAgent(Agent): 形如的占位符不要改变【非常重要】 code、latex和HTML保持结构 所有公式(包括短公式)都应该是latex公式 -修复不正确的latex公式,行内公式要用$正确包裹以构造合法latex表达式 +公式无论长短必须表示为能被解析的合法latex公式,公式需被$或\\(\\)或$$正确包裹,如不正确则进行修正 # 输出 修正后的markdown纯文本(不是markdown代码块) # 示例 @@ -56,8 +56,7 @@ class MDTranslateAgent(Agent): 不输出任何解释和注释 不能改变形如的占位符 code、latex和HTML只翻译说明文字,其余保持原文 -公式无论长短必须表示为能被解析的合法latex公式,公式需被$或\\(\\)或$$正确包裹,如不正确则进行修正 -表格如果是table标签请改为普通表格写法,注意表格正确性 +所有公式无论长短必须表示为能被解析的合法latex公式,公式需被$或\\(\\)或$$正确包裹,如不正确则进行修正 去除、修正明显异常的字符、但不能改变原意 引用参考文献时请严格保持原文,不要翻译。参考文献格式示例如下: [1] Author A, Author B. "Original Title". Journal, 2023. diff --git a/docutranslate/converter/converter.py b/docutranslate/converter/converter.py index 3fb5854..c8bd5a5 100644 --- a/docutranslate/converter/converter.py +++ b/docutranslate/converter/converter.py @@ -24,10 +24,4 @@ class Converter(Protocol): ... async def convert_async(self,document:Document)->str: - ... - - def set_config(self,cofig:dict): - ... - - def get_config_list(self)->list[str]|None: ... \ No newline at end of file diff --git a/docutranslate/converter/converter_docling.py b/docutranslate/converter/converter_docling.py index 8a34f65..0a00c30 100644 --- a/docutranslate/converter/converter_docling.py +++ b/docutranslate/converter/converter_docling.py @@ -72,12 +72,6 @@ class ConverterDocling(Converter): # translater_logger.info(f"docling转换耗时: {conversion_result.timings["pipeline_total"].times}") return result - def set_config(self, cofig: dict): - pass - - def get_config_list(self) -> list[str] | None: - pass - if __name__ == '__main__': pass diff --git a/docutranslate/converter/converter_mineru.py b/docutranslate/converter/converter_mineru.py index 8bb56d7..dcd06a5 100644 --- a/docutranslate/converter/converter_mineru.py +++ b/docutranslate/converter/converter_mineru.py @@ -124,12 +124,6 @@ class ConverterMineru(Converter): self.logger.info(f"已转换为markdown,耗时{time.time() - time1}秒") return result - def set_config(self, cofig: dict): - pass - - def get_config_list(self) -> list[str] | None: - pass - def get_md_from_zip_url_with_inline_images( zip_url: str, diff --git a/docutranslate/static/index.html b/docutranslate/static/index.html index 96939c3..6e42292 100644 --- a/docutranslate/static/index.html +++ b/docutranslate/static/index.html @@ -1,1587 +1 @@ - - - - - - - DocuTranslate - 交互式文档翻译 - - - - - - - - - - -
-
- -
-
-
-
-

DocuTranslate

- -
- - -
-
- -
- -
-
- - -
-

- -

-
-
-
- - -
-
- -
- - -
- -
-
- - -
-
- - -
-
-
-
- - -
-

- -

-
-
-
- - -
-
- - -
-
- -
- - -
-
-
- - -
-
-
-
- - -
-

- -

-
-
-
- - -
-
- - -
-
- - - -
-
-
-
- - -
-

- -

-
-
-
- - -
-
- - -
-
- - -
-
-
-
-
-
- - -
-

- GitHub主页(欢迎star❤):
- https://github.com/xunbu/docutranslate -

-

- 交流QQ群: 1047781902 -

-
- -
-
- - -
-
-
-

任务列表

- -
-
- -
-
- -

当前没有任务,点击“新建任务”开始吧!

-
-
-
-
-
- - - - - -
-
-
预览
-
- - -
- -
-
-
-
-
原文
-
-
-
-
译文
-
- -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + DocuTranslate - 交互式文档翻译

DocuTranslate

GitHub主页(欢迎star❤):
https://github.com/xunbu/docutranslate

交流QQ群: 1047781902

任务列表

当前没有任务,点击“新建任务”开始吧!

预览
原文
译文
\ No newline at end of file