Skip to content

Commit 2738317

Browse files
committed
Refine pyarmor 9.1 docs
1 parent 3f23fb4 commit 2738317

File tree

6 files changed

+196
-217
lines changed

6 files changed

+196
-217
lines changed

pyarmor/docs/en/user/configuration.rst

Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -88,42 +88,42 @@ Set option value. For example::
8888
- Bool
8989
- Recursively search modules and packages in project src
9090

91-
Section: rft_option
92-
-------------------
91+
Section: rft
92+
------------
9393

9494
List all the options and values in this section::
9595

96-
$ pyarmor env -p info rft_option
96+
$ pyarmor env -p info rft
9797

98-
Get only one option value. For example, `rft_argument`::
98+
Get only one option value. For example, `enable_argument`::
9999

100-
$ pyarmor env -p get rft_option:rft_argument
100+
$ pyarmor env -p get rft:enable_argument
101101

102102
Set option value. For example::
103103

104-
$ pyarmor env -p set rft_option:rft_argument 0
104+
$ pyarmor env -p set rft:enable_argument 0
105105

106-
.. flat-table:: Table-4. Section `rft_option` Options
106+
.. flat-table:: Table-4. Section `rft` Options
107107
:widths: 20 10 10 60
108108
:header-rows: 1
109109

110110
* - Option
111111
- Type
112112
- Default
113113
- Remark
114-
* - rft_remove_assert
114+
* - remove_assert
115115
- Bool
116116
- 0
117117
- Remove `assert` statement in the script
118-
* - rft_remove_docstr
118+
* - remove_docstr
119119
- Bool
120120
- 0
121121
- Remove all the docstring in the script
122-
* - rft_builtin
122+
* - enable_builtin
123123
- Bool
124124
- 0
125125
- Rename builtin names such as `print` etc.
126-
* - rft_argument
126+
* - enable_argument
127127
- Enum
128128
- 3
129129
- How to rename arguments in the function
@@ -132,13 +132,13 @@ Set option value. For example::
132132
- 1: only rename position-only arguments
133133
- 2: rename all the arguments except keyword-only arguments
134134
- 3: rename all the arguments
135-
* - rft_auto_export
135+
* - enable_auto_export
136136
- Bool
137137
- 0
138138
- Export all the names list in the module attribute `__all__`
139139

140140
Exported names won't be renamed
141-
* - rft_exclude_names
141+
* - exclude_names
142142
- List
143143
-
144144
- List all exported function, class, attributes
@@ -150,43 +150,24 @@ Set option value. For example::
150150
"name"
151151
"cls.name"
152152

153-
"modname:name"
154-
"modname:cls.name"
153+
"modname::name"
154+
"modname::cls.name"
155155

156-
"modname:*"
157-
"^name"
156+
"modname::*"
157+
":name"
158158

159159
Note that arguments and local variables are always renamed
160-
* - rft_exclude_args
160+
* - exclude_funcs
161161
- List
162162
-
163163
- List all the functions which arguments can't be reformed
164164

165165
The support formats::
166166

167167
"func"
168-
"modname:func"
169-
"modname:cls.method"
168+
"modname::func"
169+
"modname::cls.method"
170170
* - extra_builtins
171171
- List
172172
-
173173
- Extra builtin name
174-
* - var_type_table
175-
- List
176-
-
177-
- Define type for variable
178-
179-
The support formats::
180-
181-
modname:func.var typename
182-
modname:cls.method.var typename
183-
184-
If this variable is defined in For/With/Except/Comprehension, then use this format::
185-
186-
{modname:func.var} typename
187-
188-
The formats of typename:
189-
190-
- "cls": The class name in same module
191-
- "modname:cls": The module name and class name
192-
- "<any>": Any builtin type

pyarmor/docs/en/user/man.rst

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ Refer to :doc:`configuration` for all available options
252252
$ pyarmor env -p info
253253

254254
Sections:
255-
rft_option
255+
rft
256256

257257
Options:
258258
src scripts modules packages excludes recursive
@@ -263,13 +263,13 @@ Refer to :doc:`configuration` for all available options
263263

264264
$ pyarmor env -p info excludes
265265

266-
Show all the options in section `rft_option`::
266+
Show all the options in section `rft`::
267267

268-
$ pyarmor env -p info rft_option
268+
$ pyarmor env -p info rft
269269

270-
Show the usage of option `rft_argument` in the section `rft_option`::
270+
Show the usage of option `enable_argument` in the section `rft`::
271271

272-
$ pyarmor env -p info rft_option:rft_argument
272+
$ pyarmor env -p info rft:enable_argument
273273

274274
.. describe:: get
275275

@@ -279,17 +279,17 @@ Refer to :doc:`configuration` for all available options
279279

280280
OPTION may be format like `SECTION:OPTION`. For example::
281281

282-
$ pyarmor env -p get rft_option:rft_argument
282+
$ pyarmor env -p get rft:enable_argument
283283

284284
.. describe:: set, reset
285285

286286
Change option value or restore default value. For example::
287287

288288
$ pyarmor env -p set recursive 1
289-
$ pyarmor env -p set rft_option:rft_argument 0
289+
$ pyarmor env -p set rft:enable_argument 0
290290

291291
$ pyarmor env -p reset recursive
292-
$ pyarmor env -p reset rft_option:rft_argument
292+
$ pyarmor env -p reset rft:enable_argument
293293

294294
.. describe:: push, pop
295295

@@ -349,16 +349,16 @@ Refer to :doc:`configuration` for all available options
349349

350350
(project) ls
351351
Sections:
352-
rft_option
352+
rft
353353

354354
Options:
355355
src scripts modules packages excludes recursive
356356
* - cd
357357
- Switch section
358-
- Enter section `rft_option`, then back to parent::
358+
- Enter section `rft`, then back to parent::
359359

360-
(project) cd rft_option
361-
(project)[rft_option] cd ..
360+
(project) cd rft
361+
(project)[rft] cd ..
362362
(project)
363363
* - get
364364
- Show option value
@@ -399,14 +399,14 @@ Refer to :doc:`configuration` for all available options
399399

400400
(project) info
401401

402-
List all options in section `rft_option`::
402+
List all options in section `rft`::
403403

404-
(project) info rft_option
404+
(project) info rft
405405

406-
Show option `rft_argument` usage::
406+
Show option `enable_argument` usage::
407407

408-
(project) cd rft_option
409-
(project)[rft_option] info rft_argument
408+
(project) cd rft
409+
(project)[rft] info enable_argument
410410

411411
pyarmor build
412412
=============
@@ -419,7 +419,7 @@ Generate obfuscated scripts for project
419419

420420
[#]_ pyarmor build -h
421421

422-
[#]_ pyarmor build [--mini | --rft]
422+
[#]_ pyarmor build [--mini | --rft | --mini-rft]
423423

424424
[#]_ pyarmor build [--autofix {0,1}]
425425

@@ -444,6 +444,12 @@ Generate obfuscated scripts for project
444444

445445
$ pyarmor build --rft
446446

447+
.. option:: --mini-rft
448+
449+
First refactor the scripts as :term:`RFT Script`, then generate :term:`Mini Script` for this project::
450+
451+
$ pyarmor build --mini-rft
452+
447453
.. option:: --autofix {0,1}
448454

449455
This option can simplifying the configuration for refactoring scripts.
@@ -454,7 +460,7 @@ Generate obfuscated scripts for project
454460

455461
When auto-fix mode is enabled
456462

457-
- Always `rft_argument = 1`
463+
- Always `enable_argument = 1`
458464
- Search all unknown attributes and add them to exclude table
459465

460466
Then build the project::

0 commit comments

Comments
 (0)