提交 efb1b021 编写于 作者: 陈琦

update doc

上级 51164dce
......@@ -28,9 +28,10 @@ Parameters:
Also you can output the readable format via -H.
-a --article Convert article to yaml config file in the dir provided by -o parameter.
-l --list List user's data.
-l List build-in data.
-v --view View the detailed definition of a data format.
-l --list List user's data in current dir.
-L List build-in data in ZenData install dir.
-v --view View detailed definition of a data format in current dir.
-V View detailed definition of a data format in ZenData install dir.
-h --help Print help.
-e --example Print the data format config file of the example.
......@@ -63,6 +64,6 @@ $zd.exe -p 80 -R d:\zd\config # Listen port 80. Use d:\zd\config as th
Client Call:
$curl http:\\localhost:8848\?d=demo\default.yaml&c=demo\config.yaml&n=100 # Specify the server config file via GET.
$curl http:\\localhost:8848\?d=demo\default.yaml&c=demo\config.yaml&n=100&T=true # Specify the server config file via GET.
$curl http:\\localhost:8848\?default=demo\default.yaml&output=test.sql&table=user # Parameter names can be full.
$curl -i -X POST http:\\localhost:8848?lines=3 -F default=@demo\default.yaml # The config can be uploaded via POST.
......@@ -22,9 +22,10 @@ ZenData是一款通用的数据生成工具,您可以使用yaml文件来定义
-D --decode 根据指定的配置文件,将通过-i参数指定的数据文件解析成json格式。
-a --article 将指定的文件或目录下扩展名为.txt的文件,转换成文章yaml配置,输出到-o参数指定的目录下。
-l --list 列出用户数据。
-L 列出內置数据。
-v --view 查看某一个数据格式的详细定义。
-l --list 列出当前目录下所有的用户数据定义。
-L 列出ZenData安装目录下所有数据定义。
-v --view 查看当前目录下某个用户数据定义的详细信息。
-V 查看ZenData安装目录下某个数据定义的详细信息。
-h --help 打印帮助。
-e --example 打印示例的数据格式配置文件。
......@@ -57,6 +58,6 @@ $zd.exe -p 80 -R d:\zd\config # 监听80
客户端调用:
$curl http://localhost:8848/?d=demo/default.yaml&c=demo/config.yaml&n=100 # 通过GET方式指定服务器端配置文件。
$curl http://localhost:8848/?d=demo/default.yaml&c=demo/config.yaml&n=100&T=true # 通过GET方式指定服务器端配置文件。
$curl http://localhost:8848/?default=demo/default.yaml&output=test.sql&table=user # 参数名可以用全拼。
$curl -i -X POST http://localhost:8848?lines=3 -F default=@demo/default.yaml # 可以通过POST方式上传配置文件。
......@@ -2,21 +2,21 @@ title: test
desc: 描述
version: 1.0
fields:
# - field: field_text
# range: res/num.txt, ../demo/user.txt:R
# postfix: "\t"
- field: refer_text
range: res/num.txt, ../demo/user.txt:R
postfix: "\t"
# - field: first
# range: ../demo/15_from_range.yaml{3}, ../demo/16_from_instance.yaml{10}
# prefix: ""
# postfix: "\t"
- field: refer_content
range: ../demo/15_from_range.yaml{3}, ../demo/16_from_instance.yaml{10}
prefix: ""
postfix: "\t"
# - field: field_use_ranges_small
# from: zentao.number.v1.yaml
# use: small{3},netmask
# postfix: "\t"
- field: refer_ranges
from: zentao.number.v1.yaml
use: small{3},netmask
postfix: "\t"
- field: field_use_instance # 引用其他的定义文件,该文件定义了多个实例。
from: ip.v1.yaml # yaml/ip/v1.yaml
use: privateA{3},privateB{5} # 使用该文件中定义的privateC和privateB两个实例。
- field: refer_instance
from: ip.v1.yaml
use: privateA{3},privateB{5}
postfix: "\t"
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册