BabelDOC 0.1.7__tar.gz → 0.1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.github/workflows/publish-to-pypi.yml +2 -2
- {babeldoc-0.1.7 → babeldoc-0.1.9}/PKG-INFO +4 -2
- {babeldoc-0.1.7 → babeldoc-0.1.9}/README.md +2 -0
- babeldoc-0.1.9/babeldoc/__init__.py +1 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/backend/pdf_creater.py +15 -3
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/midend/il_translator.py +5 -2
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/translator/cache.py +2 -1
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/docvision/rpc_doclayout.py +2 -1
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/high_level.py +4 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/main.py +1 -1
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/progress_monitor.py +2 -1
- babeldoc-0.1.9/docs/CONTRIBUTOR_REWARD.md +81 -0
- babeldoc-0.1.9/docs/images/contributor_reward_example.png +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/pyproject.toml +3 -3
- {babeldoc-0.1.7 → babeldoc-0.1.9}/uv.lock +18 -3
- babeldoc-0.1.7/babeldoc/__init__.py +0 -1
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.github/dependabot.yml +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.github/labels.yml +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.github/release-drafter.yml +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.github/workflows/test.yml +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.gitignore +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/LICENSE +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/const.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/converter.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/__init__.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/backend/__init__.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/frontend/il_creater.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/il_version_1.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/il_version_1.rnc +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/il_version_1.rng +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/il_version_1.xsd +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/midend/__init__.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/midend/layout_parser.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/midend/paragraph_finder.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/midend/styles_and_formulas.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/midend/typesetting.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/translator/__init__.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/translator/translator.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/utils/layout_helper.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/document_il/xml_converter.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/pdfinterp.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/babeldoc/translation_config.py +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/README.md +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/deploy.sh +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/images/banner.png +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/images/preview.gif +0 -0
- {babeldoc-0.1.7 → babeldoc-0.1.9}/docs/intro-to-pdf-object.md +0 -0
|
@@ -82,7 +82,7 @@ jobs:
|
|
|
82
82
|
runs-on: ubuntu-latest
|
|
83
83
|
environment:
|
|
84
84
|
name: pypi
|
|
85
|
-
url: https://pypi.org/p/
|
|
85
|
+
url: https://pypi.org/p/BabelDOC
|
|
86
86
|
|
|
87
87
|
permissions:
|
|
88
88
|
id-token: write
|
|
@@ -106,7 +106,7 @@ jobs:
|
|
|
106
106
|
runs-on: ubuntu-latest
|
|
107
107
|
environment:
|
|
108
108
|
name: testpypi
|
|
109
|
-
url: https://test.pypi.org/p/
|
|
109
|
+
url: https://test.pypi.org/p/BabelDOC
|
|
110
110
|
|
|
111
111
|
permissions:
|
|
112
112
|
id-token: write
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BabelDOC
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
4
4
|
Summary: Yet Another Document Translator
|
|
5
5
|
Project-URL: Homepage, https://github.com/funstory-ai/BabelDOC
|
|
6
6
|
Project-URL: Issues, https://github.com/funstory-ai/BabelDOC/issues
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: <3.13,>=3.10
|
|
13
13
|
Requires-Dist: bitstring>=4.3.0
|
|
14
14
|
Requires-Dist: configargparse>=1.7
|
|
15
|
-
Requires-Dist: httpx>=0.27.0
|
|
15
|
+
Requires-Dist: httpx[socks]>=0.27.0
|
|
16
16
|
Requires-Dist: huggingface-hub>=0.27.0
|
|
17
17
|
Requires-Dist: msgpack>=1.1.0
|
|
18
18
|
Requires-Dist: numpy>=2.0.2
|
|
@@ -274,6 +274,8 @@ We encourage you to contribute to YADT! Please check out the [CONTRIBUTING](http
|
|
|
274
274
|
|
|
275
275
|
Everyone interacting in YADT and its sub-projects' codebases, issue trackers, chat rooms, and mailing lists is expected to follow the YADT [Code of Conduct](https://github.com/funstory-ai/yadt/blob/main/docs/CODE_OF_CONDUCT.md).
|
|
276
276
|
|
|
277
|
+
[Immersive Translation](https://immersivetranslate.com) sponsors monthly Pro membership redemption codes for active contributors to this project, see details at: [CONTRIBUTOR_REWARD.md](https://github.com/funstory-ai/BabelDOC/blob/main/docs/CONTRIBUTOR_REWARD.md)
|
|
278
|
+
|
|
277
279
|
## Acknowledgements
|
|
278
280
|
|
|
279
281
|
- [PDFMathTranslate](https://github.com/Byaidu/PDFMathTranslate)
|
|
@@ -242,6 +242,8 @@ We encourage you to contribute to YADT! Please check out the [CONTRIBUTING](http
|
|
|
242
242
|
|
|
243
243
|
Everyone interacting in YADT and its sub-projects' codebases, issue trackers, chat rooms, and mailing lists is expected to follow the YADT [Code of Conduct](https://github.com/funstory-ai/yadt/blob/main/docs/CODE_OF_CONDUCT.md).
|
|
244
244
|
|
|
245
|
+
[Immersive Translation](https://immersivetranslate.com) sponsors monthly Pro membership redemption codes for active contributors to this project, see details at: [CONTRIBUTOR_REWARD.md](https://github.com/funstory-ai/BabelDOC/blob/main/docs/CONTRIBUTOR_REWARD.md)
|
|
246
|
+
|
|
245
247
|
## Acknowledgements
|
|
246
248
|
|
|
247
249
|
- [PDFMathTranslate](https://github.com/Byaidu/PDFMathTranslate)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.9"
|
|
@@ -12,9 +12,12 @@ from babeldoc.translation_config import TranslationConfig
|
|
|
12
12
|
|
|
13
13
|
logger = logging.getLogger(__name__)
|
|
14
14
|
|
|
15
|
+
SUBSET_FONT_STAGE_NAME = "Subset font"
|
|
16
|
+
SAVE_PDF_STAGE_NAME = "Save PDF"
|
|
17
|
+
|
|
15
18
|
|
|
16
19
|
class PDFCreater:
|
|
17
|
-
stage_name = "
|
|
20
|
+
stage_name = "Generate drawing instructions"
|
|
18
21
|
|
|
19
22
|
def __init__(
|
|
20
23
|
self,
|
|
@@ -249,7 +252,7 @@ class PDFCreater:
|
|
|
249
252
|
self.font_mapper.add_font(pdf, self.docs)
|
|
250
253
|
with self.translation_config.progress_monitor.stage_start(
|
|
251
254
|
self.stage_name,
|
|
252
|
-
len(self.docs.page)
|
|
255
|
+
len(self.docs.page),
|
|
253
256
|
) as pbar:
|
|
254
257
|
for page in self.docs.page:
|
|
255
258
|
translation_config.raise_if_cancelled()
|
|
@@ -346,9 +349,18 @@ class PDFCreater:
|
|
|
346
349
|
pdf.update_stream(op_container, draw_op.tobytes())
|
|
347
350
|
pdf[page.page_number].set_contents(op_container)
|
|
348
351
|
pbar.advance()
|
|
349
|
-
|
|
352
|
+
translation_config.raise_if_cancelled()
|
|
353
|
+
with self.translation_config.progress_monitor.stage_start(
|
|
354
|
+
SUBSET_FONT_STAGE_NAME,
|
|
355
|
+
1,
|
|
356
|
+
) as pbar:
|
|
350
357
|
if not translation_config.skip_clean:
|
|
351
358
|
pdf.subset_fonts(fallback=False)
|
|
359
|
+
pbar.advance()
|
|
360
|
+
with self.translation_config.progress_monitor.stage_start(
|
|
361
|
+
SAVE_PDF_STAGE_NAME,
|
|
362
|
+
2,
|
|
363
|
+
) as pbar:
|
|
352
364
|
if not translation_config.no_mono:
|
|
353
365
|
if translation_config.debug:
|
|
354
366
|
translation_config.raise_if_cancelled()
|
|
@@ -2,6 +2,7 @@ import concurrent.futures
|
|
|
2
2
|
import json
|
|
3
3
|
import logging
|
|
4
4
|
from pathlib import Path
|
|
5
|
+
from typing import List, Union
|
|
5
6
|
|
|
6
7
|
from tqdm import tqdm
|
|
7
8
|
|
|
@@ -178,7 +179,7 @@ class ILTranslator:
|
|
|
178
179
|
def __init__(
|
|
179
180
|
self,
|
|
180
181
|
unicode: str,
|
|
181
|
-
placeholders: [RichTextPlaceholder
|
|
182
|
+
placeholders: List[Union[RichTextPlaceholder, FormulaPlaceholder]],
|
|
182
183
|
base_style: PdfStyle = None,
|
|
183
184
|
):
|
|
184
185
|
self.unicode = unicode
|
|
@@ -487,7 +488,9 @@ class ILTranslator:
|
|
|
487
488
|
PdfSameStyleCharacters,
|
|
488
489
|
) and text.replace(" ", "") == "".join(
|
|
489
490
|
x.char_unicode for x in placeholder.composition.pdf_character
|
|
490
|
-
).replace(
|
|
491
|
+
).replace(
|
|
492
|
+
" ", ""
|
|
493
|
+
):
|
|
491
494
|
comp = PdfParagraphComposition(
|
|
492
495
|
pdf_same_style_characters=placeholder.composition,
|
|
493
496
|
)
|
|
@@ -8,6 +8,8 @@ from peewee import Model
|
|
|
8
8
|
from peewee import SqliteDatabase
|
|
9
9
|
from peewee import TextField
|
|
10
10
|
|
|
11
|
+
from babeldoc.const import CACHE_FOLDER as cache_folder
|
|
12
|
+
|
|
11
13
|
# we don't init the database here
|
|
12
14
|
db = SqliteDatabase(None)
|
|
13
15
|
|
|
@@ -92,7 +94,6 @@ class TranslationCache:
|
|
|
92
94
|
|
|
93
95
|
|
|
94
96
|
def init_db(remove_exists=False):
|
|
95
|
-
cache_folder = Path.home() / ".cache" / "pdf2zh"
|
|
96
97
|
cache_folder.mkdir(parents=True, exist_ok=True)
|
|
97
98
|
# The current version does not support database migration, so add the version number to the file name.
|
|
98
99
|
cache_db_path = cache_folder / "cache.v1.db"
|
|
@@ -20,6 +20,8 @@ from babeldoc import asynchronize
|
|
|
20
20
|
from babeldoc.const import CACHE_FOLDER
|
|
21
21
|
from babeldoc.const import get_cache_file_path
|
|
22
22
|
from babeldoc.converter import TranslateConverter
|
|
23
|
+
from babeldoc.document_il.backend.pdf_creater import SAVE_PDF_STAGE_NAME
|
|
24
|
+
from babeldoc.document_il.backend.pdf_creater import SUBSET_FONT_STAGE_NAME
|
|
23
25
|
from babeldoc.document_il.backend.pdf_creater import PDFCreater
|
|
24
26
|
from babeldoc.document_il.frontend.il_creater import ILCreater
|
|
25
27
|
from babeldoc.document_il.midend.add_debug_information import AddDebugInformation
|
|
@@ -48,6 +50,8 @@ TRANSLATE_STAGES = [
|
|
|
48
50
|
Typesetting.stage_name,
|
|
49
51
|
FontMapper.stage_name,
|
|
50
52
|
PDFCreater.stage_name,
|
|
53
|
+
SUBSET_FONT_STAGE_NAME,
|
|
54
|
+
SAVE_PDF_STAGE_NAME,
|
|
51
55
|
]
|
|
52
56
|
|
|
53
57
|
resfont_map = {
|
|
@@ -20,7 +20,7 @@ from babeldoc.document_il.translator.translator import set_translate_rate_limite
|
|
|
20
20
|
from babeldoc.translation_config import TranslationConfig
|
|
21
21
|
|
|
22
22
|
logger = logging.getLogger(__name__)
|
|
23
|
-
__version__ = "0.1.
|
|
23
|
+
__version__ = "0.1.9"
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
def create_parser():
|
|
@@ -61,6 +61,7 @@ class ProgressMonitor:
|
|
|
61
61
|
stage_progress=0.0,
|
|
62
62
|
stage_current=0,
|
|
63
63
|
stage_total=total,
|
|
64
|
+
overall_progress=self.calculate_current_progress(),
|
|
64
65
|
)
|
|
65
66
|
self.last_report_time = 0.0
|
|
66
67
|
return stage
|
|
@@ -110,7 +111,7 @@ class ProgressMonitor:
|
|
|
110
111
|
def stage_update(self, stage, n: int):
|
|
111
112
|
with self.lock:
|
|
112
113
|
report_time_delta = time.time() - self.last_report_time
|
|
113
|
-
if report_time_delta < self.report_interval:
|
|
114
|
+
if report_time_delta < self.report_interval and stage.total > 3:
|
|
114
115
|
return
|
|
115
116
|
if self.progress_change_callback:
|
|
116
117
|
self.progress_change_callback(
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# BabelDOC/PDFMathTranslate 贡献者奖励规则
|
|
2
|
+
|
|
3
|
+
### **月度活跃贡献者奖励规则**
|
|
4
|
+
**一、资格标准**
|
|
5
|
+
1. **贡献类型要求**
|
|
6
|
+
- 需提交 **至少 1 个有效 PR**(Pull Request),或进行 **PR 审核、文档编写** 等贡献。
|
|
7
|
+
- 有效贡献定义:
|
|
8
|
+
- 非简单的文档错别字修复
|
|
9
|
+
- 非简单的代码格式化调整(如仅调整缩进、空格等)
|
|
10
|
+
- 需做出实质性贡献(如功能开发、Bug 修复、性能优化、架构调整、技术文档编写、PR 审核等)
|
|
11
|
+
- 示例合格贡献:新增功能模块、修复逻辑错误、优化算法效率、编写技术文档等
|
|
12
|
+
|
|
13
|
+
2. **时间范围**
|
|
14
|
+
- 每月 1 日至月末最后一天合并的 PR 计入当月统计
|
|
15
|
+
|
|
16
|
+
**二、申请流程**
|
|
17
|
+
1. **申请条件**
|
|
18
|
+
- PR 需被成功合并至[funstory-ai/BabelDOC](https://github.com/funstory-ai/BabelDOC/pulls) 仓库或 [Byaidu/PDFMathTranslate](https://github.com/Byaidu/PDFMathTranslate/pulls)的主分支。
|
|
19
|
+
- 审核 PR、撰写 wiki 等贡献也必须是以上两个仓库。
|
|
20
|
+
- 同一贡献者每月仅可申请一次(无论提交 PR 数量)
|
|
21
|
+
- 同一贡献者每月最多可以获得 1 个兑换码
|
|
22
|
+
- 对于 PR,只有发起者可以申请兑换码
|
|
23
|
+
- 仅可使用当月的贡献申请兑换码(特殊情况请联系 aw@funstory.ai 说明)
|
|
24
|
+
|
|
25
|
+
2. **申请方式**
|
|
26
|
+
- 发送邮件至 **aw@funstory.ai**
|
|
27
|
+
- 邮件标题格式:`[贡献者会员兑换码申请] GitHub用户名-月份`(例:`[贡献者会员兑换码申请] awwaawwa-2024-07`)
|
|
28
|
+
- 邮件正文需包含:
|
|
29
|
+
- GitHub 用户名
|
|
30
|
+
- 合并 PR 的完整链接
|
|
31
|
+
- 附件要求:
|
|
32
|
+
- PR 页面完整截图(需包含合并状态、仓库名称及点击头像后弹出来的侧边栏,如下图所示)
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
3. **奖励说明**
|
|
37
|
+
- 奖励内容:[沉浸式翻译(Immersive Translate)](https://immersivetranslate.com/zh-Hans/pricing/)月度会员兑换码
|
|
38
|
+
- 兑换码使用:在[沉浸式翻译官网兑换页](https://immersivetranslate.com/zh-Hans/exchange)输入即可激活
|
|
39
|
+
- 会员权益:沉浸式翻译 Pro 会员一个月(详见[官网价格页](https://immersivetranslate.com/zh-Hans/pricing/)说明)
|
|
40
|
+
- 兑换码为专属福利,不可转让
|
|
41
|
+
|
|
42
|
+
**三、审核与发放**
|
|
43
|
+
1. **审核周期**
|
|
44
|
+
- 我们会尽力在收到申请邮件后 1 个工作日内完成审核
|
|
45
|
+
- 审核时间可能因申请数量、审核复杂度等因素有所延长
|
|
46
|
+
- 审核通过后,兑换码将通过邮件方式发送
|
|
47
|
+
- 若审核未通过,我们会通过邮件说明原因
|
|
48
|
+
|
|
49
|
+
2. 兑换码规则:
|
|
50
|
+
- 使用方式:[官网兑换页](https://immersivetranslate.com/zh-Hans/exchange)输入兑换码激活
|
|
51
|
+
- 权益内容:月度会员(具体权益见[官网价格页](https://immersivetranslate.com/zh-Hans/pricing/)说明)
|
|
52
|
+
- 不可转让
|
|
53
|
+
|
|
54
|
+
**四、注意事项**
|
|
55
|
+
1. **禁止行为**
|
|
56
|
+
- 将完整功能拆分为多个无关 PR 提交
|
|
57
|
+
- 提交质量不合格或具有潜在危害的代码
|
|
58
|
+
- 提供虚假或误导性的申请材料
|
|
59
|
+
|
|
60
|
+
2. **特别说明**
|
|
61
|
+
- funstory.ai 保留对贡献价值的评估权、规则的最终解释权等所有必要权利
|
|
62
|
+
- 规则如有更新,将提前 1 天在 [BabelDOC GitHub PR](https://github.com/funstory-ai/BabelDOC/pulls) 公告
|
|
63
|
+
- 过期未使用的兑换码不予补发
|
|
64
|
+
- 自 2025 年 2 月 1 日起的贡献可以申请兑换码
|
|
65
|
+
- 为了确认您是 Pull Request (PR) 的发起者,防止他人冒领,我们可能会要求您使用发起者账号在 PR 下方留言指定的随机数字。
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
### **常见问题解答(FAQ)**
|
|
70
|
+
|
|
71
|
+
Q:如何判断文档翻译贡献是否有效?
|
|
72
|
+
A:系统性的人工翻译(如完整章节的翻译并经过人工校对)视为有效贡献。零散段落翻译或仅依赖机器翻译的内容不计入有效贡献。
|
|
73
|
+
|
|
74
|
+
Q:兑换码过期了可以补发吗?
|
|
75
|
+
A:为确保公平性,过期的兑换码将不予补发,请在有效期内及时使用。
|
|
76
|
+
|
|
77
|
+
Q:为什么这个文档是中文的?
|
|
78
|
+
A:因为目前应该是中文贡献者多吧,所以就先写中文的。后面再撰写英文版的。
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
**规则公示**:本规则文档存放于 BabelDOC 仓库 [CONTRIBUTOR_REWARD.md](https://github.com/funstory-ai/BabelDOC/blob/main/docs/CONTRIBUTOR_REWARD.md)。
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "BabelDOC"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.9"
|
|
4
4
|
description = "Yet Another Document Translator"
|
|
5
5
|
license = "AGPL-3.0"
|
|
6
6
|
readme = "README.md"
|
|
@@ -13,7 +13,7 @@ keywords = ["PDF"]
|
|
|
13
13
|
dependencies = [
|
|
14
14
|
"bitstring>=4.3.0",
|
|
15
15
|
"configargparse>=1.7",
|
|
16
|
-
"httpx>=0.27.0",
|
|
16
|
+
"httpx[socks]>=0.27.0",
|
|
17
17
|
"huggingface-hub>=0.27.0",
|
|
18
18
|
"numpy>=2.0.2",
|
|
19
19
|
"onnx>=1.17.0",
|
|
@@ -117,7 +117,7 @@ dev = [
|
|
|
117
117
|
]
|
|
118
118
|
|
|
119
119
|
[bumpver]
|
|
120
|
-
current_version = "0.1.
|
|
120
|
+
current_version = "0.1.9"
|
|
121
121
|
version_pattern = "MAJOR.MINOR.PATCH[.PYTAGNUM]"
|
|
122
122
|
|
|
123
123
|
[bumpver.file_patterns]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
+
revision = 1
|
|
2
3
|
requires-python = ">=3.10, <3.13"
|
|
3
4
|
resolution-markers = [
|
|
4
5
|
"python_full_version >= '3.12' and sys_platform == 'darwin'",
|
|
@@ -38,12 +39,12 @@ wheels = [
|
|
|
38
39
|
|
|
39
40
|
[[package]]
|
|
40
41
|
name = "babeldoc"
|
|
41
|
-
version = "0.1.
|
|
42
|
+
version = "0.1.9"
|
|
42
43
|
source = { editable = "." }
|
|
43
44
|
dependencies = [
|
|
44
45
|
{ name = "bitstring" },
|
|
45
46
|
{ name = "configargparse" },
|
|
46
|
-
{ name = "httpx" },
|
|
47
|
+
{ name = "httpx", extra = ["socks"] },
|
|
47
48
|
{ name = "huggingface-hub" },
|
|
48
49
|
{ name = "msgpack" },
|
|
49
50
|
{ name = "numpy" },
|
|
@@ -72,7 +73,7 @@ dev = [
|
|
|
72
73
|
requires-dist = [
|
|
73
74
|
{ name = "bitstring", specifier = ">=4.3.0" },
|
|
74
75
|
{ name = "configargparse", specifier = ">=1.7" },
|
|
75
|
-
{ name = "httpx", specifier = ">=0.27.0" },
|
|
76
|
+
{ name = "httpx", extras = ["socks"], specifier = ">=0.27.0" },
|
|
76
77
|
{ name = "huggingface-hub", specifier = ">=0.27.0" },
|
|
77
78
|
{ name = "msgpack", specifier = ">=1.1.0" },
|
|
78
79
|
{ name = "numpy", specifier = ">=2.0.2" },
|
|
@@ -489,6 +490,11 @@ wheels = [
|
|
|
489
490
|
{ url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517 },
|
|
490
491
|
]
|
|
491
492
|
|
|
493
|
+
[package.optional-dependencies]
|
|
494
|
+
socks = [
|
|
495
|
+
{ name = "socksio" },
|
|
496
|
+
]
|
|
497
|
+
|
|
492
498
|
[[package]]
|
|
493
499
|
name = "huggingface-hub"
|
|
494
500
|
version = "0.27.1"
|
|
@@ -1245,6 +1251,15 @@ wheels = [
|
|
|
1245
1251
|
{ url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235 },
|
|
1246
1252
|
]
|
|
1247
1253
|
|
|
1254
|
+
[[package]]
|
|
1255
|
+
name = "socksio"
|
|
1256
|
+
version = "1.0.0"
|
|
1257
|
+
source = { registry = "https://pypi.org/simple" }
|
|
1258
|
+
sdist = { url = "https://files.pythonhosted.org/packages/f8/5c/48a7d9495be3d1c651198fd99dbb6ce190e2274d0f28b9051307bdec6b85/socksio-1.0.0.tar.gz", hash = "sha256:f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac", size = 19055 }
|
|
1259
|
+
wheels = [
|
|
1260
|
+
{ url = "https://files.pythonhosted.org/packages/37/c3/6eeb6034408dac0fa653d126c9204ade96b819c936e136c5e8a6897eee9c/socksio-1.0.0-py3-none-any.whl", hash = "sha256:95dc1f15f9b34e8d7b16f06d74b8ccf48f609af32ab33c608d08761c5dcbb1f3", size = 12763 },
|
|
1261
|
+
]
|
|
1262
|
+
|
|
1248
1263
|
[[package]]
|
|
1249
1264
|
name = "sympy"
|
|
1250
1265
|
version = "1.13.3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.1.7 → babeldoc-0.1.9}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|