BabelDOC 0.2.0__tar.gz → 0.2.1__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.2.0 → babeldoc-0.2.1}/PKG-INFO +1 -1
- babeldoc-0.2.1/babeldoc/__init__.py +1 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/const.py +1 -1
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/high_level.py +7 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/main.py +1 -1
- {babeldoc-0.2.0 → babeldoc-0.2.1}/pyproject.toml +2 -2
- {babeldoc-0.2.0 → babeldoc-0.2.1}/uv.lock +2 -1
- babeldoc-0.2.0/babeldoc/__init__.py +0 -1
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.cursorignore +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/dependabot.yml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/labels.yml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/release-drafter.yml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/workflows/docs.yml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/workflows/publish-to-pypi.yml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.github/workflows/test.yml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.gitignore +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/LICENSE +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/README.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/assets/embedding_assets_metadata.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/converter.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/__init__.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/backend/__init__.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/backend/pdf_creater.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/frontend/il_creater.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/il_version_1.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/il_version_1.rnc +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/il_version_1.rng +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/il_version_1.xsd +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/midend/__init__.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/midend/detect_scanned_file.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/midend/il_translator.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/midend/layout_parser.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/midend/paragraph_finder.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/midend/styles_and_formulas.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/midend/typesetting.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/translator/__init__.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/translator/cache.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/translator/translator.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/utils/layout_helper.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/document_il/xml_converter.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/docvision/rpc_doclayout.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/pdfinterp.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/babeldoc/translation_config.py +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/CONTRIBUTOR_REWARD.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/README.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/deploy.sh +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/index.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/docs/requirements.txt +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/mkdocs.yml +0 -0
- {babeldoc-0.2.0 → babeldoc-0.2.1}/tests/test_translation_config.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.1"
|
|
@@ -300,8 +300,15 @@ def do_translate(pm, translation_config):
|
|
|
300
300
|
temp_pdf_path = translation_config.get_working_file_path("input.pdf")
|
|
301
301
|
doc_pdf2zh = Document(original_pdf_path)
|
|
302
302
|
resfont = "china-ss"
|
|
303
|
+
|
|
304
|
+
# 修复 pdf 文件中 xref 为 null 的情况
|
|
305
|
+
for i in range(1, doc_pdf2zh.xref_length()):
|
|
306
|
+
if doc_pdf2zh.xref_object(i) == "null":
|
|
307
|
+
doc_pdf2zh.update_object(i, "null")
|
|
308
|
+
|
|
303
309
|
for page in doc_pdf2zh:
|
|
304
310
|
page.insert_font(resfont, None)
|
|
311
|
+
|
|
305
312
|
resfont = None
|
|
306
313
|
doc_pdf2zh.save(temp_pdf_path)
|
|
307
314
|
il_creater = ILCreater(translation_config)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "BabelDOC"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Yet Another Document Translator"
|
|
5
5
|
license = "AGPL-3.0"
|
|
6
6
|
readme = "README.md"
|
|
@@ -134,7 +134,7 @@ pythonpath = [".", "src"]
|
|
|
134
134
|
testpaths = ["tests"]
|
|
135
135
|
|
|
136
136
|
[bumpver]
|
|
137
|
-
current_version = "0.2.
|
|
137
|
+
current_version = "0.2.1"
|
|
138
138
|
version_pattern = "MAJOR.MINOR.PATCH[.PYTAGNUM]"
|
|
139
139
|
|
|
140
140
|
[bumpver.file_patterns]
|
|
@@ -48,7 +48,7 @@ wheels = [
|
|
|
48
48
|
|
|
49
49
|
[[package]]
|
|
50
50
|
name = "babeldoc"
|
|
51
|
-
version = "0.2.
|
|
51
|
+
version = "0.2.1"
|
|
52
52
|
source = { editable = "." }
|
|
53
53
|
dependencies = [
|
|
54
54
|
{ name = "bitstring" },
|
|
@@ -1615,6 +1615,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/06/47/b61c1c44b87cbdaee
|
|
|
1615
1615
|
wheels = [
|
|
1616
1616
|
{ url = "https://files.pythonhosted.org/packages/61/9b/98ef4b98309e9db3baa9fe572f0e61b6130bb9852d13189970f35b703499/pymupdf-1.25.3-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:96878e1b748f9c2011aecb2028c5f96b5a347a9a91169130ad0133053d97915e", size = 19343576 },
|
|
1617
1617
|
{ url = "https://files.pythonhosted.org/packages/14/62/4e12126db174c8cfbf692281cda971cc4046c5f5226032c2cfaa6f83e08d/pymupdf-1.25.3-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:6ef753005b72ebfd23470f72f7e30f61e21b0b5e748045ec5b8f89e6e3068d62", size = 18580114 },
|
|
1618
|
+
{ url = "https://files.pythonhosted.org/packages/ec/c5/cf7ecf005e4f8ba3664d6aaa0613adeba4c2ab524832c452c69857e7184f/pymupdf-1.25.3-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cbff443d899f37b17f1e67563cc03673d50b4bf33ccc237e73d34f18f3a07ccf", size = 19442580 },
|
|
1618
1619
|
{ url = "https://files.pythonhosted.org/packages/52/de/bd1418e31f73d37b8381cd5deacfd681e6be702b8890e123e83724569ee1/pymupdf-1.25.3-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:46d90c4f9e62d1856e8db4b9f04a202ff4a7f086a816af73abdc86adb7f5e25a", size = 19999825 },
|
|
1619
1620
|
{ url = "https://files.pythonhosted.org/packages/42/ee/3c449b0de061440ba1ac984aa845315e9e2dca0ff2003c5adfc6febff203/pymupdf-1.25.3-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a5de51efdbe4d486b6c1111c84e8a231cbfb426f3d6ff31ab530ad70e6f39756", size = 21123157 },
|
|
1620
1621
|
{ url = "https://files.pythonhosted.org/packages/83/53/71faaaf91c56f2883b13f3dd849bf2697f012eb35eb7b952d62734cff41f/pymupdf-1.25.3-cp39-abi3-win32.whl", hash = "sha256:bca72e6089f985d800596e22973f79cc08af6cbff1d93e5bda9248326a03857c", size = 15094211 },
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.0"
|
|
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.2.0 → babeldoc-0.2.1}/babeldoc/document_il/babeldoc_exception/BabelDOCException.py
RENAMED
|
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.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.2.0 → babeldoc-0.2.1}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.2.0 → babeldoc-0.2.1}/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
|
{babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-big-logo-with-transparent-background.png
RENAMED
|
File without changes
|
{babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-big-logo-with-transparent-background.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-small-logo-with-transparent-background.png
RENAMED
|
File without changes
|
{babeldoc-0.2.0 → babeldoc-0.2.1}/docs/images/babeldoc-small-logo-with-transparent-background.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|