Skip to content

Commit 132264a

Browse files
committed
Add Traditional and Simplified Chinese Sphinx docs
Mirror the English tree under docs/source.zh-TW and docs/source.zh-CN with translated index, architecture, and usage pages; keep automodule directives identical so docstring content flows through unchanged. Add html-zh-TW / html-zh-CN / html-all targets to Makefile and make.bat, and a language switcher line in all three index.rst files.
1 parent 175e0a2 commit 132264a

37 files changed

+2693
-1
lines changed

docs/Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@ SPHINXBUILD ?= sphinx-build
44
SOURCEDIR = source
55
BUILDDIR = _build
66

7-
.PHONY: help html clean
7+
.PHONY: help html clean html-zh-TW html-zh-CN html-all
88

99
help:
1010
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
1111

1212
html:
1313
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
1414

15+
html-zh-TW:
16+
@$(SPHINXBUILD) -b html source.zh-TW "$(BUILDDIR)/html-zh-TW" $(SPHINXOPTS)
17+
18+
html-zh-CN:
19+
@$(SPHINXBUILD) -b html source.zh-CN "$(BUILDDIR)/html-zh-CN" $(SPHINXOPTS)
20+
21+
html-all: html html-zh-TW html-zh-CN
22+
1523
clean:
1624
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)

docs/make.bat

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,27 @@ if errorlevel 9009 (
1818
exit /b 1
1919
)
2020

21+
if "%1" == "html-zh-TW" goto build-zh-TW
22+
if "%1" == "html-zh-CN" goto build-zh-CN
23+
if "%1" == "html-all" goto build-all
24+
2125
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
2226
goto end
2327

28+
:build-zh-TW
29+
%SPHINXBUILD% -b html source.zh-TW %BUILDDIR%\html-zh-TW %SPHINXOPTS% %O%
30+
goto end
31+
32+
:build-zh-CN
33+
%SPHINXBUILD% -b html source.zh-CN %BUILDDIR%\html-zh-CN %SPHINXOPTS% %O%
34+
goto end
35+
36+
:build-all
37+
%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
38+
%SPHINXBUILD% -b html source.zh-TW %BUILDDIR%\html-zh-TW %SPHINXOPTS% %O%
39+
%SPHINXBUILD% -b html source.zh-CN %BUILDDIR%\html-zh-CN %SPHINXOPTS% %O%
40+
goto end
41+
2442
:help
2543
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
2644

docs/source.zh-CN/api/client.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Client SDK
2+
==========
3+
4+
.. automodule:: automation_file.client.http_client
5+
:members:

docs/source.zh-CN/api/core.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Core
2+
====
3+
4+
.. automodule:: automation_file.core.action_registry
5+
:members:
6+
7+
.. automodule:: automation_file.core.action_executor
8+
:members:
9+
10+
.. automodule:: automation_file.core.dag_executor
11+
:members:
12+
13+
.. automodule:: automation_file.core.callback_executor
14+
:members:
15+
16+
.. automodule:: automation_file.core.package_loader
17+
:members:
18+
19+
.. automodule:: automation_file.core.json_store
20+
:members:
21+
22+
.. automodule:: automation_file.core.retry
23+
:members:
24+
25+
.. automodule:: automation_file.core.quota
26+
:members:
27+
28+
.. automodule:: automation_file.core.checksum
29+
:members:
30+
31+
.. automodule:: automation_file.core.manifest
32+
:members:
33+
34+
.. automodule:: automation_file.core.fim
35+
:members:
36+
37+
.. automodule:: automation_file.core.audit
38+
:members:
39+
40+
.. automodule:: automation_file.core.crypto
41+
:members:
42+
43+
.. automodule:: automation_file.core.metrics
44+
:members:
45+
46+
.. automodule:: automation_file.core.substitution
47+
:members:
48+
49+
.. automodule:: automation_file.core.config_watcher
50+
:members:
51+
52+
.. automodule:: automation_file.core.plugins
53+
:members:
54+
55+
.. automodule:: automation_file.core.config
56+
:members:
57+
58+
.. automodule:: automation_file.core.secrets
59+
:members:
60+
61+
.. automodule:: automation_file.exceptions
62+
:members:
63+
64+
.. automodule:: automation_file.logging_config
65+
:members:

docs/source.zh-CN/api/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
API 参考
2+
========
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
core
8+
local
9+
remote
10+
server
11+
client
12+
trigger
13+
scheduler
14+
notify
15+
progress
16+
project
17+
ui
18+
utils

docs/source.zh-CN/api/local.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
本地操作
2+
========
3+
4+
.. automodule:: automation_file.local.file_ops
5+
:members:
6+
7+
.. automodule:: automation_file.local.dir_ops
8+
:members:
9+
10+
.. automodule:: automation_file.local.zip_ops
11+
:members:
12+
13+
.. automodule:: automation_file.local.sync_ops
14+
:members:
15+
16+
.. automodule:: automation_file.local.safe_paths
17+
:members:
18+
19+
.. automodule:: automation_file.local.shell_ops
20+
:members:
21+
22+
.. automodule:: automation_file.local.tar_ops
23+
:members:
24+
25+
.. automodule:: automation_file.local.json_edit
26+
:members:
27+
28+
.. automodule:: automation_file.local.conditional
29+
:members:

docs/source.zh-CN/api/notify.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
通知
2+
====
3+
4+
.. automodule:: automation_file.notify.sinks
5+
:members:
6+
7+
.. automodule:: automation_file.notify.manager
8+
:members:

docs/source.zh-CN/api/progress.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
进度与取消
2+
==========
3+
4+
传输的可选仪表化。对 :func:`~automation_file.download_file`、
5+
:func:`s3_upload_file` 或 :func:`s3_download_file` 传入
6+
``progress_name="<label>"``,传输即会注册到共享的
7+
:data:`~automation_file.core.progress.progress_registry`。之后 GUI 或
8+
JSON 动作即可轮询 reporter 快照,或在传输中途取消。
9+
10+
.. automodule:: automation_file.core.progress
11+
:members:

docs/source.zh-CN/api/project.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
项目脚手架
2+
==========
3+
4+
.. automodule:: automation_file.project.project_builder
5+
:members:
6+
7+
.. automodule:: automation_file.project.templates
8+
:members:

docs/source.zh-CN/api/remote.rst

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
远程操作
2+
========
3+
4+
.. automodule:: automation_file.remote.url_validator
5+
:members:
6+
7+
.. automodule:: automation_file.remote.http_download
8+
:members:
9+
10+
Google Drive
11+
------------
12+
13+
.. automodule:: automation_file.remote.google_drive.client
14+
:members:
15+
16+
.. automodule:: automation_file.remote.google_drive.delete_ops
17+
:members:
18+
19+
.. automodule:: automation_file.remote.google_drive.folder_ops
20+
:members:
21+
22+
.. automodule:: automation_file.remote.google_drive.search_ops
23+
:members:
24+
25+
.. automodule:: automation_file.remote.google_drive.share_ops
26+
:members:
27+
28+
.. automodule:: automation_file.remote.google_drive.upload_ops
29+
:members:
30+
31+
.. automodule:: automation_file.remote.google_drive.download_ops
32+
:members:
33+
34+
S3
35+
---
36+
37+
随 ``automation_file`` 一并打包;由
38+
:func:`automation_file.core.action_registry.build_default_registry` 自动注册。
39+
40+
.. automodule:: automation_file.remote.s3.client
41+
:members:
42+
43+
.. automodule:: automation_file.remote.s3.upload_ops
44+
:members:
45+
46+
.. automodule:: automation_file.remote.s3.download_ops
47+
:members:
48+
49+
.. automodule:: automation_file.remote.s3.delete_ops
50+
:members:
51+
52+
.. automodule:: automation_file.remote.s3.list_ops
53+
:members:
54+
55+
Azure Blob
56+
----------
57+
58+
随 ``automation_file`` 一并打包;由
59+
:func:`automation_file.core.action_registry.build_default_registry` 自动注册。
60+
61+
.. automodule:: automation_file.remote.azure_blob.client
62+
:members:
63+
64+
.. automodule:: automation_file.remote.azure_blob.upload_ops
65+
:members:
66+
67+
.. automodule:: automation_file.remote.azure_blob.download_ops
68+
:members:
69+
70+
.. automodule:: automation_file.remote.azure_blob.delete_ops
71+
:members:
72+
73+
.. automodule:: automation_file.remote.azure_blob.list_ops
74+
:members:
75+
76+
Dropbox
77+
-------
78+
79+
随 ``automation_file`` 一并打包;由
80+
:func:`automation_file.core.action_registry.build_default_registry` 自动注册。
81+
82+
.. automodule:: automation_file.remote.dropbox_api.client
83+
:members:
84+
85+
.. automodule:: automation_file.remote.dropbox_api.upload_ops
86+
:members:
87+
88+
.. automodule:: automation_file.remote.dropbox_api.download_ops
89+
:members:
90+
91+
.. automodule:: automation_file.remote.dropbox_api.delete_ops
92+
:members:
93+
94+
.. automodule:: automation_file.remote.dropbox_api.list_ops
95+
:members:
96+
97+
SFTP
98+
----
99+
100+
随 ``automation_file`` 一并打包;由
101+
:func:`automation_file.core.action_registry.build_default_registry` 自动注册。
102+
使用 :class:`paramiko.RejectPolicy`——未知主机不会被自动添加。
103+
104+
.. automodule:: automation_file.remote.sftp.client
105+
:members:
106+
107+
.. automodule:: automation_file.remote.sftp.upload_ops
108+
:members:
109+
110+
.. automodule:: automation_file.remote.sftp.download_ops
111+
:members:
112+
113+
.. automodule:: automation_file.remote.sftp.delete_ops
114+
:members:
115+
116+
.. automodule:: automation_file.remote.sftp.list_ops
117+
:members:
118+
119+
FTP / FTPS
120+
----------
121+
122+
随 ``automation_file`` 一并打包;由
123+
:func:`automation_file.core.action_registry.build_default_registry` 自动注册。
124+
支持纯 FTP 与显式 FTPS(通过 ``FTP_TLS`` + ``auth()``)。
125+
126+
.. automodule:: automation_file.remote.ftp.client
127+
:members:
128+
129+
.. automodule:: automation_file.remote.ftp.upload_ops
130+
:members:
131+
132+
.. automodule:: automation_file.remote.ftp.download_ops
133+
:members:
134+
135+
.. automodule:: automation_file.remote.ftp.delete_ops
136+
:members:
137+
138+
.. automodule:: automation_file.remote.ftp.list_ops
139+
:members:
140+
141+
跨后端
142+
------
143+
144+
.. automodule:: automation_file.remote.cross_backend
145+
:members:

0 commit comments

Comments
 (0)