Skip to content

Commit 7723269

Browse files
committed
Fix code block problem
Fix code block problem
1 parent 405eee4 commit 7723269

File tree

11 files changed

+27
-1
lines changed

11 files changed

+27
-1
lines changed

Diff for: docs/source/Zh/doc/callback_function/callback_function_doc.rst

+2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@
3232
這段程式碼會把所有 time module 的 builtin, function, method, class
3333
載入到 callback executor,然後要使用被載入的 function 需要使用 package_function 名稱,
3434
例如 time.sleep 會變成 time_sleep
35+
3536
.. code-block:: python
3637
from je_auto_control import package_manager
3738
package_manager.add_package_to_callback_executor("time")
3839
3940
如果你需要查看被更新的 event_dict 可以使用
41+
4042
.. code-block:: python
4143
from je_auto_control import callback_executor
4244
print(callback_executor.event_dict)

Diff for: docs/source/Zh/doc/cli/cli_doc.rst

+2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33

44
我們可以使用 CLI 模式去執行 keyword.json 檔案或執行包含 Keyword.json files 的資料夾,
55
以下這個範例是去執行指定路徑的關鍵字 json 檔
6+
67
.. code-block::
78
python je_auto_control --execute_file "C:\Users\JeffreyChen\Desktop\Code_Space\AutoControl\test\unit_test\argparse\test1.json"
89
910
1011
1112
以下這個範例是去執行指定路徑資料夾下所有的 keyword json 檔
13+
1214
.. code-block::
1315
python je_auto_control --execute_dir "C:\Users\JeffreyChen\Desktop\Code_Space\AutoControl\test\unit_test\argparse"

Diff for: docs/source/Zh/doc/critical_exit/critical_exit_doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
以下這個範例是讓滑鼠不受控制的移動並拋出例外,
99
當接收到例外,初始化 Critical Exit 並自動按下 F7,
1010
( 注意! 如果修改這個範例必須極度小心。 )
11+
1112
.. code-block:: python
1213
import sys
1314

Diff for: docs/source/Zh/doc/generate_report/generate_report_doc.rst

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Generate Report 可以生成以下格式的報告
99
* 如果要使用 Generate Report 需要先設定紀錄為 True,使用 test_record_instance.init_record = True
1010
* 下面的範例有搭配 keyword and executor 如果看不懂可以先去看看 executor
1111
以下是產生 HTML 的範例。
12+
1213
.. code-block:: python
1314
import sys
1415
@@ -56,6 +57,7 @@ Generate Report 可以生成以下格式的報告
5657
5758
5859
以下是產生 JSON 的範例。
60+
5961
.. code-block:: python
6062
import sys
6163
@@ -102,6 +104,7 @@ Generate Report 可以生成以下格式的報告
102104
execute_action(test_list)
103105
104106
以下是產生 XML 的範例。
107+
105108
.. code-block:: python
106109
import sys
107110

Diff for: docs/source/Zh/doc/image/image_doc.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* 定位圖片在螢幕中的位置並點擊。
88

99
以下範例是定位所有圖片
10+
1011
.. code-block:: python
1112
import time
1213
@@ -21,7 +22,8 @@
2122
image_data = locate_all_image(screenshot(), detect_threshold=0.9, draw_image=False)
2223
print(image_data)
2324
24-
以下範例是定位並點擊'圖片
25+
以下範例是定位並點擊圖片
26+
2527
.. code-block:: python
2628
import time
2729
@@ -36,6 +38,7 @@
3638
print(image_data)
3739
3840
以下範例是定位圖片
41+
3942
.. code-block:: python
4043
import time
4144

Diff for: docs/source/Zh/doc/installation/installation_doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* ubuntu 20.0.4
1616

1717
| 如果想要在樹梅派使用
18+
1819
.. code-block:: python
1920
2021
sudo apt-get install python3

Diff for: docs/source/Zh/doc/keyboard/keyboard_doc.rst

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
以下範例是取得鍵盤的資訊,
88
* special_table 是特定的鍵盤按鍵 ( 注意! 不是每個平台都有 )
99
* keys_table 是所有可以使用的按鍵
10+
1011
.. code-block:: python
1112
from je_auto_control import keys_table, get_special_table
1213
@@ -15,6 +16,7 @@
1516
1617
1718
以下範例是按著鍵盤的某個按鍵,並在一秒後釋放
19+
1820
.. code-block:: python
1921
from time import sleep
2022
from je_auto_control import press_key, release_key
@@ -24,24 +26,28 @@
2426
release_key("a")
2527
2628
以下範例是按下與釋放按鍵
29+
2730
.. code-block:: python
2831
from je_auto_control import type_key
2932
3033
type_key("a")
3134
3235
以下範例是檢查鍵盤 a 鍵是否按著
36+
3337
.. code-block:: python
3438
from je_auto_control import check_key_is_press
3539
3640
check_key_is_press("a")
3741
3842
以下範例是按下與放開一串按鍵
43+
3944
.. code-block:: python
4045
from je_auto_control import write
4146
4247
write("abcdefg")
4348
4449
以下範例是按下按鍵並相反的釋放
50+
4551
.. code-block:: python
4652
import sys
4753

Diff for: docs/source/Zh/doc/keyword_and_executor/keyword_and_executor_doc.rst

+4
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,27 @@
1919
這段程式碼會把所有 time module 的 builtin, function, method, class
2020
載入到 executor,然後要使用被載入的 function 需要使用 package_function 名稱,
2121
例如 time.sleep 會變成 time_sleep
22+
2223
.. code-block:: python
2324
from je_auto_control import package_manager
2425
package_manager.add_package_to_executor("time")
2526
2627
2728
2829
如果你需要查看被更新的 event_dict 可以使用
30+
2931
.. code-block:: python
3032
from je_auto_control import executor
3133
print(executor.event_dict)
3234
3335
如果我們想要執行 JSON 檔案
36+
3437
.. code-block:: python
3538
from je_auto_control import execute_action, read_action_json
3639
execute_action(read_action_json(file_path))
3740
3841
如果我們想要執行資料夾裡所有 JSON 檔案
42+
3943
.. code-block:: python
4044
from je_auto_control import execute_files, get_dir_files_as_list
4145
execute_files(get_dir_files_as_list(dir_path))

Diff for: docs/source/Zh/doc/record/record_doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* 可以搭配 executor 使用來重播鍵盤跟滑鼠動作。
66

77
以下是範例如何使用
8+
89
.. code-block:: python
910
from time import sleep
1011

Diff for: docs/source/Zh/doc/screen/screen_doc.rst

+2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
* Screen 主要用來取得螢幕尺寸與截圖。
55

66
以下範例是截圖
7+
78
.. code-block:: python
89
from je_auto_control import screenshot
910
1011
screenshot()
1112
1213
以下範例是取得螢幕尺寸
14+
1315
.. code-block:: python
1416
from je_auto_control import size
1517

Diff for: docs/source/Zh/doc/socket_driver/socket_driver_doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Socket Driver 文件
1010
* 每個段落結束都應該傳輸 Return_Data_Over_JE。
1111
* 使用 UTF-8 encoding。
1212
* 傳送 quit_server 將會關閉伺服器。
13+
1314
.. code-block:: python
1415
import sys
1516

0 commit comments

Comments
 (0)