pdf2zh-next 2.0.0__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.
- pdf2zh_next-2.0.0/.dockerignore +175 -0
- pdf2zh_next-2.0.0/.github/FUNDING.yml +15 -0
- pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE/blank.yaml +14 -0
- pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE/config.yml +1 -0
- pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE//345/212/237/350/203/275/350/257/267/346/261/202_cn.yaml +25 -0
- pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE//345/212/237/350/203/275/350/257/267/346/261/202_en.yaml +26 -0
- pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE//351/227/256/351/242/230/345/217/215/351/246/210_cn.yaml +94 -0
- pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE//351/227/256/351/242/230/345/217/215/351/246/210_en.yaml +93 -0
- pdf2zh_next-2.0.0/.github/dependabot.yml +21 -0
- pdf2zh_next-2.0.0/.github/release-drafter.yml +55 -0
- pdf2zh_next-2.0.0/.github/workflows/codeql.yml +92 -0
- pdf2zh_next-2.0.0/.github/workflows/docs.yml +50 -0
- pdf2zh_next-2.0.0/.github/workflows/exe-build.yml +171 -0
- pdf2zh_next-2.0.0/.github/workflows/fork-build.yml +325 -0
- pdf2zh_next-2.0.0/.github/workflows/fork-test.yml +24 -0
- pdf2zh_next-2.0.0/.github/workflows/lint.yml +17 -0
- pdf2zh_next-2.0.0/.github/workflows/pr-lint.yml +46 -0
- pdf2zh_next-2.0.0/.github/workflows/python-test.yml +71 -0
- pdf2zh_next-2.0.0/.github/workflows/release.yml +574 -0
- pdf2zh_next-2.0.0/.gitignore +174 -0
- pdf2zh_next-2.0.0/.pre-commit-config.yaml +14 -0
- pdf2zh_next-2.0.0/Dockerfile +32 -0
- pdf2zh_next-2.0.0/LICENSE +661 -0
- pdf2zh_next-2.0.0/PKG-INFO +218 -0
- pdf2zh_next-2.0.0/README.md +180 -0
- pdf2zh_next-2.0.0/app.json +5 -0
- pdf2zh_next-2.0.0/docs/APIS.md +97 -0
- pdf2zh_next-2.0.0/docs/CNAME +1 -0
- pdf2zh_next-2.0.0/docs/FAQ.md +70 -0
- pdf2zh_next-2.0.0/docs/Home.md +10 -0
- pdf2zh_next-2.0.0/docs/advanced/Documentation-of-Translation-Services.md +80 -0
- pdf2zh_next-2.0.0/docs/advanced/Language-Codes.md +109 -0
- pdf2zh_next-2.0.0/docs/advanced/advanced.md +282 -0
- pdf2zh_next-2.0.0/docs/advanced/introduction.md +15 -0
- pdf2zh_next-2.0.0/docs/community/CODE_OF_CONDUCT.md +128 -0
- pdf2zh_next-2.0.0/docs/community/Contribution-Guide.md +110 -0
- pdf2zh_next-2.0.0/docs/getting-started/INSTALLATION_docker.md +54 -0
- pdf2zh_next-2.0.0/docs/getting-started/INSTALLATION_uv.md +34 -0
- pdf2zh_next-2.0.0/docs/getting-started/INSTALLATION_winexe.md +59 -0
- pdf2zh_next-2.0.0/docs/getting-started/USAGE_commandline.md +50 -0
- pdf2zh_next-2.0.0/docs/getting-started/USAGE_webui.md +46 -0
- pdf2zh_next-2.0.0/docs/getting-started/getting-started.md +19 -0
- pdf2zh_next-2.0.0/docs/images/after.png +0 -0
- pdf2zh_next-2.0.0/docs/images/banner.png +0 -0
- pdf2zh_next-2.0.0/docs/images/before.png +0 -0
- pdf2zh_next-2.0.0/docs/images/cmd.explained.png +0 -0
- pdf2zh_next-2.0.0/docs/images/cmd.explained.zh.png +0 -0
- pdf2zh_next-2.0.0/docs/images/cmd_dark.png +0 -0
- pdf2zh_next-2.0.0/docs/images/cmd_dark.svg +1900 -0
- pdf2zh_next-2.0.0/docs/images/cmd_light.png +0 -0
- pdf2zh_next-2.0.0/docs/images/cmd_light.svg +1793 -0
- pdf2zh_next-2.0.0/docs/images/env_dark.png +0 -0
- pdf2zh_next-2.0.0/docs/images/env_light.png +0 -0
- pdf2zh_next-2.0.0/docs/images/ev_dark.svg +2134 -0
- pdf2zh_next-2.0.0/docs/images/ev_light.svg +2044 -0
- pdf2zh_next-2.0.0/docs/images/gui.gif +0 -0
- pdf2zh_next-2.0.0/docs/images/logo_dark.svg +6 -0
- pdf2zh_next-2.0.0/docs/images/logo_light.svg +6 -0
- pdf2zh_next-2.0.0/docs/images/logo_photo.svg +5 -0
- pdf2zh_next-2.0.0/docs/images/preview.gif +0 -0
- pdf2zh_next-2.0.0/docs/index.md +2 -0
- pdf2zh_next-2.0.0/docs/supported_languages.md +2 -0
- pdf2zh_next-2.0.0/mkdocs.yml +142 -0
- pdf2zh_next-2.0.0/pdf2zh_next/__init__.py +69 -0
- pdf2zh_next-2.0.0/pdf2zh_next/config/__init__.py +55 -0
- pdf2zh_next-2.0.0/pdf2zh_next/config/cli_env_model.py +96 -0
- pdf2zh_next-2.0.0/pdf2zh_next/config/main.py +632 -0
- pdf2zh_next-2.0.0/pdf2zh_next/config/model.py +306 -0
- pdf2zh_next-2.0.0/pdf2zh_next/config/translate_engine_model.py +578 -0
- pdf2zh_next-2.0.0/pdf2zh_next/const.py +16 -0
- pdf2zh_next-2.0.0/pdf2zh_next/gui.py +1415 -0
- pdf2zh_next-2.0.0/pdf2zh_next/high_level.py +621 -0
- pdf2zh_next-2.0.0/pdf2zh_next/http_api.py +0 -0
- pdf2zh_next-2.0.0/pdf2zh_next/main.py +104 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/__init__.py +13 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/base_rate_limiter.py +3 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/base_translator.py +188 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/cache.py +152 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/rate_limiter/qps_rate_limiter.py +38 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/anythingllm.py +55 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/azure.py +47 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/azureopenai.py +85 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/bing.py +66 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/deepl.py +41 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/dify.py +56 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/google.py +60 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/ollama.py +92 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/openai.py +90 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/qwenmt.py +114 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/siliconflow.py +89 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/tmt.py +50 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/translator_impl/xinference.py +88 -0
- pdf2zh_next-2.0.0/pdf2zh_next/translator/utils.py +43 -0
- pdf2zh_next-2.0.0/pdf2zh_next/utils/asynchronize/__init__.py +93 -0
- pdf2zh_next-2.0.0/pyproject.toml +160 -0
- pdf2zh_next-2.0.0/script/Dockerfile.China +19 -0
- pdf2zh_next-2.0.0/script/Dockerfile.Demo +31 -0
- pdf2zh_next-2.0.0/script/_pystand_static.int +33 -0
- pdf2zh_next-2.0.0/script/setup.bat +27 -0
- pdf2zh_next-2.0.0/setup.cfg +4 -0
- pdf2zh_next-2.0.0/test/test_cache.py +212 -0
- pdf2zh_next-2.0.0/test/test_translator.py.disable +229 -0
- pdf2zh_next-2.0.0/tests/config/conftest.py +23 -0
- pdf2zh_next-2.0.0/tests/config/test_main.py +555 -0
- pdf2zh_next-2.0.0/tests/config/test_model.py +405 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
.github
|
|
2
|
+
docs
|
|
3
|
+
.git
|
|
4
|
+
.pre-commit-config.yaml
|
|
5
|
+
uv.lock
|
|
6
|
+
pdf2zh_files
|
|
7
|
+
gui/pdf2zh_files
|
|
8
|
+
gradio_files
|
|
9
|
+
tmp
|
|
10
|
+
gui/gradio_files
|
|
11
|
+
gui/tmp
|
|
12
|
+
# Byte-compiled / optimized / DLL files
|
|
13
|
+
__pycache__/
|
|
14
|
+
*.py[cod]
|
|
15
|
+
*$py.class
|
|
16
|
+
|
|
17
|
+
# C extensions
|
|
18
|
+
*.so
|
|
19
|
+
|
|
20
|
+
# Distribution / packaging
|
|
21
|
+
.Python
|
|
22
|
+
build/
|
|
23
|
+
develop-eggs/
|
|
24
|
+
dist/
|
|
25
|
+
downloads/
|
|
26
|
+
eggs/
|
|
27
|
+
.eggs/
|
|
28
|
+
lib/
|
|
29
|
+
lib64/
|
|
30
|
+
parts/
|
|
31
|
+
sdist/
|
|
32
|
+
var/
|
|
33
|
+
wheels/
|
|
34
|
+
share/python-wheels/
|
|
35
|
+
*.egg-info/
|
|
36
|
+
.installed.cfg
|
|
37
|
+
*.egg
|
|
38
|
+
MANIFEST
|
|
39
|
+
|
|
40
|
+
# PyInstaller
|
|
41
|
+
# Usually these files are written by a python script from a template
|
|
42
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
43
|
+
*.manifest
|
|
44
|
+
*.spec
|
|
45
|
+
|
|
46
|
+
# Installer logs
|
|
47
|
+
pip-log.txt
|
|
48
|
+
pip-delete-this-directory.txt
|
|
49
|
+
|
|
50
|
+
# Unit test / coverage reports
|
|
51
|
+
htmlcov/
|
|
52
|
+
.tox/
|
|
53
|
+
.nox/
|
|
54
|
+
.coverage
|
|
55
|
+
.coverage.*
|
|
56
|
+
.cache
|
|
57
|
+
nosetests.xml
|
|
58
|
+
coverage.xml
|
|
59
|
+
*.cover
|
|
60
|
+
*.py,cover
|
|
61
|
+
.hypothesis/
|
|
62
|
+
.pytest_cache/
|
|
63
|
+
cover/
|
|
64
|
+
|
|
65
|
+
# Translations
|
|
66
|
+
*.mo
|
|
67
|
+
*.pot
|
|
68
|
+
|
|
69
|
+
# Django stuff:
|
|
70
|
+
*.log
|
|
71
|
+
local_settings.py
|
|
72
|
+
db.sqlite3
|
|
73
|
+
db.sqlite3-journal
|
|
74
|
+
|
|
75
|
+
# Flask stuff:
|
|
76
|
+
instance/
|
|
77
|
+
.webassets-cache
|
|
78
|
+
|
|
79
|
+
# Scrapy stuff:
|
|
80
|
+
.scrapy
|
|
81
|
+
|
|
82
|
+
# Sphinx documentation
|
|
83
|
+
docs/_build/
|
|
84
|
+
|
|
85
|
+
# PyBuilder
|
|
86
|
+
.pybuilder/
|
|
87
|
+
target/
|
|
88
|
+
|
|
89
|
+
# Jupyter Notebook
|
|
90
|
+
.ipynb_checkpoints
|
|
91
|
+
|
|
92
|
+
# IPython
|
|
93
|
+
profile_default/
|
|
94
|
+
ipython_config.py
|
|
95
|
+
|
|
96
|
+
# pyenv
|
|
97
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
98
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
99
|
+
# .python-version
|
|
100
|
+
|
|
101
|
+
# pipenv
|
|
102
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
103
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
104
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
105
|
+
# install all needed dependencies.
|
|
106
|
+
#Pipfile.lock
|
|
107
|
+
|
|
108
|
+
# poetry
|
|
109
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
110
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
111
|
+
# commonly ignored for libraries.
|
|
112
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
113
|
+
#poetry.lock
|
|
114
|
+
|
|
115
|
+
# pdm
|
|
116
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
117
|
+
#pdm.lock
|
|
118
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
119
|
+
# in version control.
|
|
120
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
121
|
+
.pdm.toml
|
|
122
|
+
.pdm-python
|
|
123
|
+
.pdm-build/
|
|
124
|
+
|
|
125
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
126
|
+
__pypackages__/
|
|
127
|
+
|
|
128
|
+
# Celery stuff
|
|
129
|
+
celerybeat-schedule
|
|
130
|
+
celerybeat.pid
|
|
131
|
+
|
|
132
|
+
# SageMath parsed files
|
|
133
|
+
*.sage.py
|
|
134
|
+
|
|
135
|
+
# Environments
|
|
136
|
+
.env
|
|
137
|
+
.venv
|
|
138
|
+
env/
|
|
139
|
+
venv/
|
|
140
|
+
ENV/
|
|
141
|
+
env.bak/
|
|
142
|
+
venv.bak/
|
|
143
|
+
|
|
144
|
+
# Spyder project settings
|
|
145
|
+
.spyderproject
|
|
146
|
+
.spyproject
|
|
147
|
+
|
|
148
|
+
# Rope project settings
|
|
149
|
+
.ropeproject
|
|
150
|
+
|
|
151
|
+
# mkdocs documentation
|
|
152
|
+
/site
|
|
153
|
+
|
|
154
|
+
# mypy
|
|
155
|
+
.mypy_cache/
|
|
156
|
+
.dmypy.json
|
|
157
|
+
dmypy.json
|
|
158
|
+
|
|
159
|
+
# Pyre type checker
|
|
160
|
+
.pyre/
|
|
161
|
+
|
|
162
|
+
# pytype static type analyzer
|
|
163
|
+
.pytype/
|
|
164
|
+
|
|
165
|
+
# Cython debug symbols
|
|
166
|
+
cython_debug/
|
|
167
|
+
|
|
168
|
+
# PyCharm
|
|
169
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
170
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
171
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
172
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
173
|
+
.idea/
|
|
174
|
+
.vscode
|
|
175
|
+
.DS_Store
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [Byaidu, reycn, Wybxc, hellofinch] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
12
|
+
polar: # Replace with a single Polar username
|
|
13
|
+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
|
14
|
+
thanks_dev: # Replace with a single thanks.dev username
|
|
15
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: Blank Issue
|
|
2
|
+
description: Create a blank issue for discussion
|
|
3
|
+
body:
|
|
4
|
+
- type: checkboxes
|
|
5
|
+
id: checks
|
|
6
|
+
attributes:
|
|
7
|
+
label: before ...
|
|
8
|
+
options:
|
|
9
|
+
- label: This issue is not about question or bug.
|
|
10
|
+
required: true
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: describe
|
|
13
|
+
attributes:
|
|
14
|
+
label: Add a description
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE//345/212/237/350/203/275/350/257/267/346/261/202_cn.yaml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: 功能请求
|
|
2
|
+
description: 使用中文进行功能请求
|
|
3
|
+
labels: ['enhancement']
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: describe
|
|
7
|
+
attributes:
|
|
8
|
+
label: 在什么场景下,需要你请求的功能?
|
|
9
|
+
description: 简要描述相关的使用场景
|
|
10
|
+
validations:
|
|
11
|
+
required: false
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: solution
|
|
14
|
+
attributes:
|
|
15
|
+
label: 解决方案
|
|
16
|
+
description: 描述你想要的解决方案
|
|
17
|
+
validations:
|
|
18
|
+
required: false
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: additional
|
|
21
|
+
attributes:
|
|
22
|
+
label: 其他内容
|
|
23
|
+
description: 关于该功能请求的任何其他项目。
|
|
24
|
+
validations:
|
|
25
|
+
required: false
|
pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE//345/212/237/350/203/275/350/257/267/346/261/202_en.yaml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest an idea for this project
|
|
3
|
+
labels: ['enhancement']
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: describe
|
|
7
|
+
attributes:
|
|
8
|
+
label: Is your feature request related to a problem?
|
|
9
|
+
description: A clear and concise description of what the problem is
|
|
10
|
+
placeholder: Ex. I'm always frustrated when ...
|
|
11
|
+
validations:
|
|
12
|
+
required: false
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: solution
|
|
15
|
+
attributes:
|
|
16
|
+
label: Describe the solution you'd like
|
|
17
|
+
description: A clear and concise description of what you want to happen
|
|
18
|
+
validations:
|
|
19
|
+
required: false
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: additional
|
|
22
|
+
attributes:
|
|
23
|
+
label: Additional context
|
|
24
|
+
description: Add any other projects about the feature request here.
|
|
25
|
+
validations:
|
|
26
|
+
required: false
|
pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE//351/227/256/351/242/230/345/217/215/351/246/210_cn.yaml
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
name: 上报 Bug
|
|
2
|
+
description: 使用中文进行 Bug 报告
|
|
3
|
+
labels: ['bug']
|
|
4
|
+
body:
|
|
5
|
+
- type: checkboxes
|
|
6
|
+
id: checks
|
|
7
|
+
attributes:
|
|
8
|
+
label: 在提问之前...
|
|
9
|
+
options:
|
|
10
|
+
- label: 我已经搜索了现有的 issues
|
|
11
|
+
required: true
|
|
12
|
+
- label: 我在提问题之前至少花费了 5 分钟来思考和准备
|
|
13
|
+
required: true
|
|
14
|
+
- label: 我已经认真且完整的阅读了 wiki
|
|
15
|
+
required: true
|
|
16
|
+
- label: 我已经认真检查了问题和网络环境无关(包括但不限于Google不可用,模型下载失败)
|
|
17
|
+
required: true
|
|
18
|
+
- type: markdown
|
|
19
|
+
attributes:
|
|
20
|
+
value: |
|
|
21
|
+
感谢您使用本项目并反馈!
|
|
22
|
+
请再次确认上述复选框所述的内容已经认真执行!
|
|
23
|
+
- type: textarea
|
|
24
|
+
id: environment
|
|
25
|
+
attributes:
|
|
26
|
+
label: 使用的环境
|
|
27
|
+
placeholder: |
|
|
28
|
+
- **OS**: Ubuntu 24.10
|
|
29
|
+
- **Python**: 3.12.0
|
|
30
|
+
- **pdf2zh**: 1.9.0
|
|
31
|
+
render: markdown
|
|
32
|
+
validations:
|
|
33
|
+
required: false
|
|
34
|
+
- type: dropdown
|
|
35
|
+
id: install
|
|
36
|
+
attributes:
|
|
37
|
+
label: 请选择安装方式
|
|
38
|
+
options:
|
|
39
|
+
- pip
|
|
40
|
+
- exe
|
|
41
|
+
- 源码
|
|
42
|
+
- docker
|
|
43
|
+
validations:
|
|
44
|
+
required: true
|
|
45
|
+
- type: textarea
|
|
46
|
+
id: describe
|
|
47
|
+
attributes:
|
|
48
|
+
label: 描述你的问题
|
|
49
|
+
description: 简要描述你的问题
|
|
50
|
+
validations:
|
|
51
|
+
required: true
|
|
52
|
+
- type: textarea
|
|
53
|
+
id: reproduce
|
|
54
|
+
attributes:
|
|
55
|
+
label: 如何复现
|
|
56
|
+
description: 重现该行为的步骤
|
|
57
|
+
value: |
|
|
58
|
+
1. 执行 '...'
|
|
59
|
+
2. 选择 '....'
|
|
60
|
+
3. 出现问题
|
|
61
|
+
validations:
|
|
62
|
+
required: false
|
|
63
|
+
- type: textarea
|
|
64
|
+
id: expected
|
|
65
|
+
attributes:
|
|
66
|
+
label: 预期行为
|
|
67
|
+
description: 简要描述你期望得到的反馈
|
|
68
|
+
validations:
|
|
69
|
+
required: false
|
|
70
|
+
- type: textarea
|
|
71
|
+
id: logs
|
|
72
|
+
attributes:
|
|
73
|
+
label: 相关 Logs
|
|
74
|
+
description: 请复制并粘贴任何相关的日志输出。
|
|
75
|
+
render: Text
|
|
76
|
+
validations:
|
|
77
|
+
required: false
|
|
78
|
+
- type: textarea
|
|
79
|
+
id: PDFfile
|
|
80
|
+
attributes:
|
|
81
|
+
label: 原始PDF文件
|
|
82
|
+
description: |
|
|
83
|
+
如果涉及到排版错误的问题,请一定提供原始的PDF文件,方便复现错误。
|
|
84
|
+
validations:
|
|
85
|
+
required: false
|
|
86
|
+
- type: textarea
|
|
87
|
+
id: others
|
|
88
|
+
attributes:
|
|
89
|
+
label: 还有别的吗?
|
|
90
|
+
description: |
|
|
91
|
+
相关的配置?链接?参考资料?
|
|
92
|
+
任何能让我们对你所遇到的问题有更多了解的东西。
|
|
93
|
+
validations:
|
|
94
|
+
required: false
|
pdf2zh_next-2.0.0/.github/ISSUE_TEMPLATE//351/227/256/351/242/230/345/217/215/351/246/210_en.yaml
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Create a report to help us improve
|
|
3
|
+
labels: ['bug']
|
|
4
|
+
body:
|
|
5
|
+
- type: checkboxes
|
|
6
|
+
id: checks
|
|
7
|
+
attributes:
|
|
8
|
+
label: Before you asking
|
|
9
|
+
options:
|
|
10
|
+
- label: I have searched the existing issues
|
|
11
|
+
required: true
|
|
12
|
+
- label: I spend at least 5 minutes for thinking and preparing
|
|
13
|
+
required: true
|
|
14
|
+
- label: I have thoroughly and completely read the wiki.
|
|
15
|
+
required: true
|
|
16
|
+
- label: I have carefully checked the issue, and it is unrelated to the network environment.
|
|
17
|
+
required: true
|
|
18
|
+
- type: markdown
|
|
19
|
+
attributes:
|
|
20
|
+
value: |
|
|
21
|
+
Thank you for using this project and providing feedback!
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: environment
|
|
24
|
+
attributes:
|
|
25
|
+
label: Environment
|
|
26
|
+
placeholder: |
|
|
27
|
+
- **OS**: Ubuntu 24.10
|
|
28
|
+
- **Python**: 3.12.0
|
|
29
|
+
- **pdf2zh**: 1.9.0
|
|
30
|
+
render: markdown
|
|
31
|
+
validations:
|
|
32
|
+
required: false
|
|
33
|
+
- type: dropdown
|
|
34
|
+
id: install
|
|
35
|
+
attributes:
|
|
36
|
+
label: How to install pdf2zh_next
|
|
37
|
+
options:
|
|
38
|
+
- pip
|
|
39
|
+
- exe
|
|
40
|
+
- source
|
|
41
|
+
- docker
|
|
42
|
+
validations:
|
|
43
|
+
required: true
|
|
44
|
+
- type: textarea
|
|
45
|
+
id: describe
|
|
46
|
+
attributes:
|
|
47
|
+
label: Describe the bug
|
|
48
|
+
description: A clear and concise description of what the bug is.
|
|
49
|
+
validations:
|
|
50
|
+
required: true
|
|
51
|
+
- type: textarea
|
|
52
|
+
id: reproduce
|
|
53
|
+
attributes:
|
|
54
|
+
label: To Reproduce
|
|
55
|
+
description: Steps to reproduce the behavior
|
|
56
|
+
value: |
|
|
57
|
+
1. execute '...'
|
|
58
|
+
2. select '....'
|
|
59
|
+
3. see errors
|
|
60
|
+
validations:
|
|
61
|
+
required: false
|
|
62
|
+
- type: textarea
|
|
63
|
+
id: expected
|
|
64
|
+
attributes:
|
|
65
|
+
label: Expected behavior
|
|
66
|
+
description: A clear and concise description of what you expected to happen.
|
|
67
|
+
validations:
|
|
68
|
+
required: false
|
|
69
|
+
- type: textarea
|
|
70
|
+
id: logs
|
|
71
|
+
attributes:
|
|
72
|
+
label: Relevant log output
|
|
73
|
+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
|
74
|
+
render: Text
|
|
75
|
+
validations:
|
|
76
|
+
required: false
|
|
77
|
+
- type: textarea
|
|
78
|
+
id: PDFfile
|
|
79
|
+
attributes:
|
|
80
|
+
label: Origin PDF file
|
|
81
|
+
description: |
|
|
82
|
+
If the issue involves formatting errors, please provide the original PDF file to facilitate reproduction of the error.
|
|
83
|
+
validations:
|
|
84
|
+
required: false
|
|
85
|
+
- type: textarea
|
|
86
|
+
id: others
|
|
87
|
+
attributes:
|
|
88
|
+
label: Anything else?
|
|
89
|
+
description: |
|
|
90
|
+
Related configs? Links? References?
|
|
91
|
+
Anything that will give us more context about the issue you are encountering!
|
|
92
|
+
validations:
|
|
93
|
+
required: false
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: github-actions
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
# - package-ecosystem: pip
|
|
8
|
+
# directory: "/.github/workflows"
|
|
9
|
+
# schedule:
|
|
10
|
+
# interval: weekly
|
|
11
|
+
# - package-ecosystem: pip
|
|
12
|
+
# directory: "/docs"
|
|
13
|
+
# schedule:
|
|
14
|
+
# interval: weekly
|
|
15
|
+
- package-ecosystem: pip
|
|
16
|
+
directory: "/"
|
|
17
|
+
schedule:
|
|
18
|
+
interval: weekly
|
|
19
|
+
versioning-strategy: lockfile-only
|
|
20
|
+
allow:
|
|
21
|
+
- dependency-type: "all"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name-template: 'v$RESOLVED_VERSION'
|
|
2
|
+
tag-template: 'v$RESOLVED_VERSION'
|
|
3
|
+
categories:
|
|
4
|
+
- title: '🚀 Features'
|
|
5
|
+
labels:
|
|
6
|
+
- 'feature'
|
|
7
|
+
- 'enhancement'
|
|
8
|
+
- title: '🐛 Bug Fixes'
|
|
9
|
+
labels:
|
|
10
|
+
- 'fix'
|
|
11
|
+
- 'bugfix'
|
|
12
|
+
- 'bug'
|
|
13
|
+
- title: '🧰 Maintenance'
|
|
14
|
+
labels:
|
|
15
|
+
- 'chore'
|
|
16
|
+
- 'maintenance'
|
|
17
|
+
- 'refactor'
|
|
18
|
+
- title: '📝 Documentation'
|
|
19
|
+
labels:
|
|
20
|
+
- 'docs'
|
|
21
|
+
- 'documentation'
|
|
22
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
|
23
|
+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions
|
|
24
|
+
version-resolver:
|
|
25
|
+
major:
|
|
26
|
+
labels:
|
|
27
|
+
- 'major'
|
|
28
|
+
minor:
|
|
29
|
+
labels:
|
|
30
|
+
- 'minor'
|
|
31
|
+
patch:
|
|
32
|
+
labels:
|
|
33
|
+
- 'patch'
|
|
34
|
+
default: patch
|
|
35
|
+
template: |
|
|
36
|
+
## Changes
|
|
37
|
+
|
|
38
|
+
$CHANGES
|
|
39
|
+
|
|
40
|
+
## Contributors
|
|
41
|
+
|
|
42
|
+
$CONTRIBUTORS
|
|
43
|
+
|
|
44
|
+
## Windows Specific
|
|
45
|
+
|
|
46
|
+
If you cannot open it after downloading, please install https://aka.ms/vs/17/release/vc_redist.x64.exe and try again.
|
|
47
|
+
|
|
48
|
+
## Assets
|
|
49
|
+
|
|
50
|
+
- pdf2zh-v$RESOLVED_VERSION-win64.zip: pdf2zh **without** assets(font, model, etc.)
|
|
51
|
+
- pdf2zh-v$RESOLVED_VERSION-with-assets-win64.zip: (**Recommended**) pdf2zh **with** assets(font, model, etc.)
|
|
52
|
+
|
|
53
|
+
> [!NOTE]
|
|
54
|
+
>
|
|
55
|
+
> The version without assets will also dynamically download resources when running, but the download may fail due to network issues.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL Advanced"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
pull_request:
|
|
17
|
+
branches: [ "main" ]
|
|
18
|
+
schedule:
|
|
19
|
+
- cron: '36 14 * * 1'
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
analyze:
|
|
23
|
+
name: Analyze (${{ matrix.language }})
|
|
24
|
+
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
|
25
|
+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
|
26
|
+
# - https://gh.io/supported-runners-and-hardware-resources
|
|
27
|
+
# - https://gh.io/using-larger-runners (GitHub.com only)
|
|
28
|
+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
|
29
|
+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
|
30
|
+
permissions:
|
|
31
|
+
# required for all workflows
|
|
32
|
+
security-events: write
|
|
33
|
+
|
|
34
|
+
# required to fetch internal or private CodeQL packs
|
|
35
|
+
packages: read
|
|
36
|
+
|
|
37
|
+
# only required for workflows in private repositories
|
|
38
|
+
actions: read
|
|
39
|
+
contents: read
|
|
40
|
+
|
|
41
|
+
strategy:
|
|
42
|
+
fail-fast: false
|
|
43
|
+
matrix:
|
|
44
|
+
include:
|
|
45
|
+
- language: python
|
|
46
|
+
build-mode: none
|
|
47
|
+
- language: actions
|
|
48
|
+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
|
49
|
+
# Use `c-cpp` to analyze code written in C, C++ or both
|
|
50
|
+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
|
51
|
+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
|
52
|
+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
|
53
|
+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
|
54
|
+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
|
55
|
+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
|
56
|
+
steps:
|
|
57
|
+
- name: Checkout repository
|
|
58
|
+
uses: actions/checkout@v4
|
|
59
|
+
|
|
60
|
+
# Initializes the CodeQL tools for scanning.
|
|
61
|
+
- name: Initialize CodeQL
|
|
62
|
+
uses: github/codeql-action/init@v3
|
|
63
|
+
with:
|
|
64
|
+
languages: ${{ matrix.language }}
|
|
65
|
+
build-mode: ${{ matrix.build-mode }}
|
|
66
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
67
|
+
# By default, queries listed here will override any specified in a config file.
|
|
68
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
69
|
+
|
|
70
|
+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
71
|
+
# queries: security-extended,security-and-quality
|
|
72
|
+
|
|
73
|
+
# If the analyze step fails for one of the languages you are analyzing with
|
|
74
|
+
# "We were unable to automatically build your code", modify the matrix above
|
|
75
|
+
# to set the build mode to "manual" for that language. Then modify this step
|
|
76
|
+
# to build your code.
|
|
77
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
78
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
79
|
+
- if: matrix.build-mode == 'manual'
|
|
80
|
+
shell: bash
|
|
81
|
+
run: |
|
|
82
|
+
echo 'If you are using a "manual" build mode for one or more of the' \
|
|
83
|
+
'languages you are analyzing, replace this with the commands to build' \
|
|
84
|
+
'your code, for example:'
|
|
85
|
+
echo ' make bootstrap'
|
|
86
|
+
echo ' make release'
|
|
87
|
+
exit 1
|
|
88
|
+
|
|
89
|
+
- name: Perform CodeQL Analysis
|
|
90
|
+
uses: github/codeql-action/analyze@v3
|
|
91
|
+
with:
|
|
92
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
jobs:
|
|
9
|
+
deploy:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
with:
|
|
14
|
+
fetch-depth: 0
|
|
15
|
+
- name: Process homepage
|
|
16
|
+
run: |
|
|
17
|
+
sed 's|./docs|./|g' README.md > docs/index.md
|
|
18
|
+
- name: Configure Git Credentials
|
|
19
|
+
run: |
|
|
20
|
+
git config user.name github-actions[bot]
|
|
21
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
22
|
+
- name: Setup uv with Python 3.13
|
|
23
|
+
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.13"
|
|
26
|
+
enable-cache: true
|
|
27
|
+
cache-dependency-glob: "uv.lock"
|
|
28
|
+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
29
|
+
- uses: actions/cache@v4
|
|
30
|
+
with:
|
|
31
|
+
key: mkdocs-material-${{ env.cache_id }}
|
|
32
|
+
path: .cache
|
|
33
|
+
restore-keys: |
|
|
34
|
+
mkdocs-material-
|
|
35
|
+
- run: uv sync
|
|
36
|
+
- run: uv run mkdocs gh-deploy --force
|
|
37
|
+
clear-cache:
|
|
38
|
+
needs:
|
|
39
|
+
- deploy
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
steps:
|
|
42
|
+
- name: Sleep for 30 seconds
|
|
43
|
+
run: sleep 30s
|
|
44
|
+
shell: bash
|
|
45
|
+
- name: Cloudflare Purge Cache
|
|
46
|
+
uses: jakejarvis/cloudflare-purge-action@eee6dba0236093358f25bb1581bd615dc8b3d8e3 # v0.3.0
|
|
47
|
+
env:
|
|
48
|
+
# Zone is required by both authentication methods
|
|
49
|
+
CLOUDFLARE_ZONE: ${{ secrets.PDF2ZH_NEXT_COM_CLOUDFLARE_ZONE }}
|
|
50
|
+
CLOUDFLARE_TOKEN: ${{ secrets.PDF2ZH_NEXT_COM_CLOUDFLARE_TOKEN }}
|