Skip to content

Commit 2482f52

Browse files
authored
Update CLI Docs (#349)
* wip * update some more cli docs * update docusaurus
1 parent 2ad5488 commit 2482f52

17 files changed

+955
-685
lines changed

docs/99-others/_category_.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"label": "其他",
3+
"key": "general-other",
34
"position": 99,
45
"collapsible": true
5-
}
6+
}

docs/developers/cocli/3-cli-action-operations.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,54 @@ coScene 的动作系统可以用来触发复杂的计算和处理过程,通过
1212
cocli action -h
1313
```
1414

15-
![cocli-action-help](./img/6-3-cocli-action-help.png)
15+
```
16+
Work with coScene action.
1617
17-
# 列出当前项目中的动作
18+
Usage:
19+
cocli action [command]
1820
19-
```bash
20-
cocli action list
21-
```
21+
Available Commands:
22+
list List actions in the current project
23+
list-run List action-runs in the current project
24+
run Create an action run.
2225
23-
![cocli-list-actions](./img/6-3-cocli-list-actions.png)
26+
Flags:
27+
-h, --help help for action
2428
25-
默认 List 下,命令行会将项目中所有的动作都列出来。通过 Category 类别以及 Author 作者,
26-
我们可以更好的区分想要的动作。
29+
Global Flags:
30+
--config string config file path (default "/Users/yujing/.cocli.yaml")
31+
--log-level string log level, one of: trace|debug|info|warn|error (default "info")
2732
28-
当然我们也可以使用 `grep` 等标准命令来做进一步的筛选
33+
Use "cocli action [command] --help" for more information about a command.
34+
```
35+
36+
# 列出当前项目中的动作 {#list-actions-in-the-current-project}
37+
38+
```bash
39+
cocli action list
40+
```
2941

30-
![cocli-list-actions-grep-system](./img/6-3-action-list-filtering.png)
42+
```
43+
ID CATEGORY TITLE AUTHOR UPDATE TIME
44+
5110ab15-9cc9-452b-b9d6-46be3adc7ef4 system analysis-export 1970-01-01T08:00:00+08:00
45+
c2a0f23a-0384-4de3-bed6-ee27e457c714 system copy-record 1970-01-01T08:00:00+08:00
46+
7a605493-628e-4348-9c3d-446cc6cbfcb1 system create-task 1970-01-01T08:00:00+08:00
47+
bf9b33a3-1f00-44a8-afb8-a9920b9b66e6 system csv-mcap-converter 1970-01-01T08:00:00+08:00
48+
a142623d-b7f9-4989-a8fe-7d12e9f66694 system curve-comparison 1970-01-01T08:00:00+08:00
49+
5ecf5286-cb74-470f-a172-6cc8f346191f system decompress-file 1970-01-01T08:00:00+08:00
50+
73c5d00c-7c3d-41b9-b3d2-31d7b54df94e system event-creator 1970-01-01T08:00:00+08:00
51+
a903fb83-f028-4bef-ab5a-c6a1c7df9a69 system extraction 1970-01-01T08:00:00+08:00
52+
e99fecdb-74c5-41f9-8061-841d054d52a8 system hdf5-mcap-converter 1970-01-01T08:00:00+08:00
53+
7b48486a-b94d-4558-ac79-8c2b91ab0f50 system mcap-hdf5-converter 1970-01-01T08:00:00+08:00
54+
d8fcf7dd-b7f7-4c5d-ae4a-c45ba0321c89 system parse-pcap-and-upload 1970-01-01T08:00:00+08:00
55+
06105ba0-3a69-4fc4-9bf4-8795b423e8fe system record-auto-diagnosis 1970-01-01T08:00:00+08:00
56+
68813bbe-d4e4-478d-acce-49f790e9cea7 system record-clipper 1970-01-01T08:00:00+08:00
57+
f9ceb8c8-63c3-4b37-a057-e9f70755e354 system remote-file-for-record 1970-01-01T08:00:00+08:00
58+
fb1bb37a-7b27-11ee-b962-0242ac120002 system ros2-mcap-converter 1970-01-01T08:00:00+08:00
59+
6cdf7cf9-d635-4cad-9333-cb58fc6a8e24 system yw-cyber-converter 1970-01-01T08:00:00+08:00
60+
```
3161

32-
## 触发动作
62+
## 触发动作 {#trigger-an-action}
3363

3464
找到我们想要的执行的动作之后,我们可以在命令行中,直接触发这个动作,实现全流程的自动化。
3565

@@ -43,7 +73,10 @@ ACTION_ID=$(cocli action list | grep 'coScene-test' | cut -d ' ' -f1)
4373
cocli action run $ACTION_ID $RECORD_ID
4474
```
4575

46-
![cocli-run-action-manual-confirm](./img/6-3-run-action-confirm.png)
76+
```
77+
The final parameters in the action run to be created:
78+
Action run created successfully.
79+
```
4780

4881
执行动作是一个比较消耗计算和存储资源的操作,在没有 `-f` 标识位的情况下,需要手动确认
4982
才会真正执行。如果对当前操作不需要进行手动确认的,可以使用 `-f` 标志直接跳过。这在批量
@@ -53,7 +86,10 @@ cocli action run $ACTION_ID $RECORD_ID
5386
cocli action run $ACTION_ID $RECORD_ID -f
5487
```
5588

56-
![cocli-run-action-force](./img/6-3-run-action-force.png)
89+
```
90+
The final parameters in the action run to be created:
91+
Action run created successfully.
92+
```
5793

5894
较为复杂的动作可能会需要额外的参数对动作进行定制,您可以使用 `-p` 的标志位提供这些参数
5995

-192 KB
Binary file not shown.
-111 KB
Binary file not shown.
-229 KB
Binary file not shown.
-15 KB
Binary file not shown.
-14.5 KB
Binary file not shown.

docs/viz/8-extensions/5-api/6-other/_category_.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"label": "其他",
3+
"key": "viz-extensions-other",
34
"position": 6,
45
"collapsible": true,
56
"link": {

docusaurus.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ const config = {
2424
baseUrl: '/',
2525
onBrokenLinks: 'throw',
2626
onBrokenAnchors: 'throw',
27-
onBrokenMarkdownLinks: 'throw',
2827
onDuplicateRoutes: 'throw',
2928
favicon: 'img/favicon.ico',
3029
markdown: {
3130
mermaid: true,
31+
hooks: {
32+
onBrokenMarkdownLinks: 'throw',
33+
},
3234
},
3335
themes: ['@docusaurus/theme-mermaid'],
3436

i18n/en/docusaurus-plugin-content-docs/current/developers/cocli/3-cli-action-operations.md

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,52 @@ The coScene action system can be used to trigger complex calculations and proces
1111
cocli action -h
1212
```
1313

14-
![cocli-action-help](./img/cocli-action-help.png)
14+
```
15+
Work with coScene action.
16+
17+
Usage:
18+
cocli action [command]
19+
20+
Available Commands:
21+
list List actions in the current project
22+
list-run List action-runs in the current project
23+
run Create an action run.
24+
25+
Flags:
26+
-h, --help help for action
27+
28+
Global Flags:
29+
--config string config file path (default "/Users/yujing/.cocli.yaml")
30+
--log-level string log level, one of: trace|debug|info|warn|error (default "info")
31+
32+
Use "cocli action [command] --help" for more information about a command.
33+
```
1534

1635
# List Actions in the Current Project
1736

1837
```bash
1938
cocli action list
2039
```
2140

22-
![cocli-list-actions](./img/cocli-list-actions.png)
23-
24-
By default, the list command will display all actions in the project. You can better distinguish the desired actions by category and author.
25-
26-
Of course, you can also use standard commands like `grep` for further filtering.
27-
![cocli-list-actions-grep-system](./img/cocli-list-actions-grep-system.png)
41+
```
42+
ID CATEGORY TITLE AUTHOR UPDATE TIME
43+
5110ab15-9cc9-452b-b9d6-46be3adc7ef4 system analysis-export 1970-01-01T08:00:00+08:00
44+
c2a0f23a-0384-4de3-bed6-ee27e457c714 system copy-record 1970-01-01T08:00:00+08:00
45+
7a605493-628e-4348-9c3d-446cc6cbfcb1 system create-task 1970-01-01T08:00:00+08:00
46+
bf9b33a3-1f00-44a8-afb8-a9920b9b66e6 system csv-mcap-converter 1970-01-01T08:00:00+08:00
47+
a142623d-b7f9-4989-a8fe-7d12e9f66694 system curve-comparison 1970-01-01T08:00:00+08:00
48+
5ecf5286-cb74-470f-a172-6cc8f346191f system decompress-file 1970-01-01T08:00:00+08:00
49+
73c5d00c-7c3d-41b9-b3d2-31d7b54df94e system event-creator 1970-01-01T08:00:00+08:00
50+
a903fb83-f028-4bef-ab5a-c6a1c7df9a69 system extraction 1970-01-01T08:00:00+08:00
51+
e99fecdb-74c5-41f9-8061-841d054d52a8 system hdf5-mcap-converter 1970-01-01T08:00:00+08:00
52+
7b48486a-b94d-4558-ac79-8c2b91ab0f50 system mcap-hdf5-converter 1970-01-01T08:00:00+08:00
53+
d8fcf7dd-b7f7-4c5d-ae4a-c45ba0321c89 system parse-pcap-and-upload 1970-01-01T08:00:00+08:00
54+
06105ba0-3a69-4fc4-9bf4-8795b423e8fe system record-auto-diagnosis 1970-01-01T08:00:00+08:00
55+
68813bbe-d4e4-478d-acce-49f790e9cea7 system record-clipper 1970-01-01T08:00:00+08:00
56+
f9ceb8c8-63c3-4b37-a057-e9f70755e354 system remote-file-for-record 1970-01-01T08:00:00+08:00
57+
fb1bb37a-7b27-11ee-b962-0242ac120002 system ros2-mcap-converter 1970-01-01T08:00:00+08:00
58+
6cdf7cf9-d635-4cad-9333-cb58fc6a8e24 system yw-cyber-converter 1970-01-01T08:00:00+08:00
59+
```
2860

2961
## Trigger an Action
3062

@@ -40,15 +72,21 @@ ACTION_ID=$(cocli action list | grep 'coScene-test' | cut -d ' ' -f1)
4072
cocli action run $ACTION_ID $RECORD_ID
4173
```
4274

43-
![cocli-run-action-manual-confirm](./img/cocli-run-action-manual-confirm.png)
75+
```
76+
The final parameters in the action run to be created:
77+
Action run created successfully.
78+
```
4479

4580
Executing an action is a resource-intensive operation. Without the `-f` flag, you need to manually confirm the execution. If you do not need manual confirmation for the current operation, you can use the `-f` flag to skip it. This is very useful when processing large amounts of data in bulk.
4681

4782
```bash
4883
cocli action run $ACTION_ID $RECORD_ID -f
4984
```
5085

51-
![cocli-run-action-force](./img/cocli-run-action-force.png)
86+
```
87+
The final parameters in the action run to be created:
88+
Action run created successfully.
89+
```
5290

5391
More complex actions may require additional parameters for customization. You can provide these parameters using the `-p` flag.
5492

@@ -62,6 +100,6 @@ Please note that in this calling mode, if there are parameters other than `param
62100

63101
After successfully triggering an action, you can view the invocation history to see the actions you have triggered.
64102

65-
## Find All Invocation Records of a Specific Action
66-
67-
## Filter by Status
103+
```bash
104+
cocli action list-run
105+
```

0 commit comments

Comments
 (0)