@@ -17,9 +17,10 @@ Pyarmor 命令行工具是提供了命令行操作方式的一个应用程序
17
17
:name: graph-pyarmor-cli-lifecycle
18
18
19
19
digraph G {
20
- node [shape=box, style=rounded]
20
+ node [shape=box, style=rounded, target="_top" ]
21
21
22
- package [label="Python 包 pyarmor.cli\n 发布在 PyPI"]
22
+ package [label="Python 包 pyarmor.cli\n 发布在 PyPI"
23
+ href="https://pypi.org/project/pyarmor.cli/"]
23
24
install [label="在构建设备上面安装 pyarmor 命令\n pip install pyarmor.cli"]
24
25
pyarmor [label="执行命令 pyarmor\n 实现 Pyarmor 的功能"]
25
26
@@ -34,16 +35,16 @@ Pyarmor 命令行工具是提供了命令行操作方式的一个应用程序
34
35
:name: g-pyarmor-cli-components
35
36
36
37
digraph G {
37
- node [shape=box, style=rounded]
38
+ node [shape=box, style=rounded, target="_top" ]
38
39
39
40
subgraph C {
40
41
cluster=true
41
42
label="子命令"
42
43
style="setlinewidth(0)"
43
44
44
- init [label="pyarmor init"]
45
- env [label="pyarmor env"]
46
- build [label="pyarmor build"]
45
+ init [label="pyarmor init", href="commands.html#cmd-init" ]
46
+ env [label="pyarmor env", href="commands.html#cmd-env" ]
47
+ build [label="pyarmor build", href="commands.html#cmd-build" ]
47
48
}
48
49
}
49
50
@@ -56,16 +57,16 @@ Pyarmor 命令行工具是提供了命令行操作方式的一个应用程序
56
57
:name: g-pyarmor-cli-functions
57
58
58
59
digraph G {
59
- node [shape=box, style=rounded]
60
+ node [shape=box, style=rounded, target="_top" ]
60
61
61
- init [label="pyarmor init"]
62
- env [label="pyarmor env"]
63
- build [label="pyarmor build"]
62
+ init [label="pyarmor init", href="commands.html#cmd-init" ]
63
+ env [label="pyarmor env", href="commands.html#cmd-env" ]
64
+ build [label="pyarmor build", href="commands.html#cmd-build" ]
64
65
65
- project [label="工程"]
66
- miniscript [label="迷你型加密脚本"]
67
- rftscript [label="重构型加密脚本"]
68
- license [shape=component, label="Pyarmor 许可证", target="_top", href="https://pyarmor.readthedocs.io/zh/latest/licenses.html"]
66
+ project [label="工程", href="concepts.html#project" ]
67
+ miniscript [label="迷你型加密脚本", href="concepts.html#mini-script"] ]
68
+ rftscript [label="重构型加密脚本", href="concepts.html#rft-script"] ]
69
+ license [shape=component, label="Pyarmor 许可证", href="https://pyarmor.readthedocs.io/zh/latest/licenses.html"]
69
70
joint [shape=point]
70
71
71
72
init -> project [label="创建"]
@@ -91,18 +92,18 @@ Pyarmor 工程
91
92
:name: g-project-components
92
93
93
94
digraph G {
94
- node [shape=box, style=rounded]
95
+ node [shape=box, style=rounded, target="_top ]
95
96
rankdir="LR"
96
97
97
98
subgraph C {
98
99
cluster=true
99
100
label="工程"
100
101
101
- scripts [label="脚本"]
102
- modules [label="模块"]
103
- package [label="包"]
102
+ scripts [label="脚本", href="project.html" ]
103
+ modules [label="模块", href="project.html" ]
104
+ package [label="包", href="project.html" ]
104
105
105
- rftoptions [label="重构选项", shape=diamond]
106
+ rftoptions [label="重构选项", shape=diamond, href="project.html#rft-options" ]
106
107
}
107
108
108
109
edge [style=invis]
@@ -119,17 +120,17 @@ Pyarmor 工程
119
120
:name: g-script-types
120
121
121
122
digraph G {
122
- node [shape=box, style=rounded]
123
+ node [shape=box, style=rounded, target="_top ]
123
124
rankdir="LR"
124
125
125
126
subgraph C {
126
127
cluster=true
127
128
label="加密脚本类型"
128
129
style="setlinewidth(0)"
129
130
130
- std [label="标准型", target="_top", href="https://pyarmor.readthedocs.io/zh/latest/tutorial/getting-started.html"]
131
- rft [label="重构型", target="_top", href="concepts.html#rft-script"]
132
- mini [label="迷你型", target="_top", href="concepts.html#mini-script"]
131
+ std [label="标准型", href="https://pyarmor.readthedocs.io/zh/latest/tutorial/getting-started.html"]
132
+ rft [label="重构型", href="concepts.html#rft-script"]
133
+ mini [label="迷你型", href="concepts.html#mini-script"]
133
134
}
134
135
135
136
edge [style=invis]
@@ -207,13 +208,28 @@ Pyarmor 工程
207
208
.. code-block :: python
208
209
:linenos:
209
210
210
- msg = ' Hello'
211
- print (msg)
211
+ def plusinc (m , n = 1 ):
212
+ return m + n + 1
213
+ a = plusinc
214
+ b = a
215
+ n = b(1 , n = 2 )
216
+
217
+ def hello ():
218
+ return b(3 , n = 4 )
219
+
220
+ print (' result is' , n + hello())
212
221
213
222
使用 Pyarmor 生成重构型加密脚本之后,输出的 `dist/foo.py ` 内容如下
214
223
215
224
.. code-block :: python
216
225
:linenos:
217
226
218
- pyarmor__1 = ' Hello'
219
- pyarmor__2(pyarmor__1)
227
+ def pyarmor__3 (pyarmor__1 , pyarmor__2 = 1 ):
228
+ return pyarmor__1 + pyarmor__2 + 1
229
+ pyarmor__4 = pyarmor__3
230
+ pyarmor__5 = pyarmor__4
231
+ pyarmor__2 = pyarmor__5(1 , pyarmor__2 = 2 )
232
+
233
+ def pyarmor__6 ():
234
+ return pyarmor__5(3 , pyarmor__2 = 4 )
235
+ print (' result is' , pyarmor__2 + pyarmor__6())
0 commit comments