Skip to content
This repository was archived by the owner on Apr 10, 2022. It is now read-only.

Commit f4d6fec

Browse files
committed
update
1 parent 974d035 commit f4d6fec

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# HiSub: a tool generating Hiplot plugin from R script
1+
# HiSub: generate Hiplot native plugin from R script
22

33
Hiplot plugin (self-contained Apps generated by Shiny or other techniques are not included) uses JSON to communicate with the front end, it is not easy to code and maintain both R script and JSON files at the same time. In current stage, a formal Hiplot plugin has the following structure in a directory:
44

@@ -38,7 +38,7 @@ For better use this tools, I recommend you to generate a soft link to the `hisub
3838
ln -s ~/Documents/GitHub/hiplot-plugin-generator/hisub.R ~/.local/bin/hisub
3939
```
4040

41-
Change the first path to your clone `hisub.R` path and change the second path to a path store executable file.
41+
Change the first path to your cloned `hisub.R` path and change the second path to a path storing the executable file.
4242
NOTE, the second path should be in system `PATH` variable so you can call **HiSub** with `hisub`.
4343

4444
### Hello World
@@ -121,13 +121,14 @@ With the R script, we can generate the Hiplot plugin with command:
121121
./hisub.R examples/helloworld.R test_hello
122122
```
123123

124-
**HiSub** accept as many as parameters you can put, but only the first and the last arguments will be used.
124+
**HiSub** accept as many as parameters you can put, but only the first will be treated as the R script to parse
125+
126+
Others:
125127

126-
- The 1st argument should be the prepared R script file.
127128
- The last argument should be a directory path for the plugin, typically it has the same name as your plugin name.
128129
- Other middle arguments will be treated as necessary files (like `README.md`, currently it cannot be scripts called by the 1st R script ) and copied to the destination directory (specified by the last argument).
129130

130-
Then you can submit the generated `data.json` and `ui.json` to https://hiplot.com.cn/developer/plugin-preview to see how it works. For our "Hello World", it looks like:
131+
Then you can submit the generated `data.json` and `ui.json` to <https://hiplot.com.cn/developer/plugin-preview> (You can also read exmaples provided by this link and see how to set the parameter settings) to see how it works. For our "Hello World", it looks like:
131132

132133
![image-20210204202229053](https://gitee.com/ShixiangWang/ImageCollection/raw/master/png/20210204202229.png)
133134

@@ -172,6 +173,6 @@ This section I will briefly describe supported tags, for more information, pleas
172173

173174
### Docs
174175

175-
We are preparing, read <https://hiplot.com.cn/docs/zh/development-guides/> for now.
176+
See [doc.md](doc.md)
176177

177178
&copy; 2020 Hiplot team

doc.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,20 @@
3939

4040
## 通用参数
4141

42-
一般是为 ggplot2 设定的
42+
一般是为 ggplot2 设定的
4343
## Vue 控件类型
4444

4545
`<param-type>::<widget-type>::<param_setting>`
4646

47-
vue 控件类型和常用参数
47+
Vue 控件类型和常用参数
4848

4949
## 全局变量
5050

51-
conf 和 opt 这两个全局变量
51+
`conf``opt` 这两个全局变量,可以直接使用。
52+
53+
`conf`为最常用的一个,里面包含了从`data.json`中解析出来的插件参数。
54+
55+
## More
56+
57+
https://hiplot.com.cn/docs/zh/development-guides/
58+

0 commit comments

Comments
 (0)