subdata
v1.0.0
Published
a command line tool for generating fake data for the `substrate-based` chain
Downloads
1
Readme
subdata
subdata
is a command line tool for generating fake data for the substrate-based
chain
Installation
npm install -g git+https://github.com/bingryan/subdata.git
Options
The following options are supported by the generate script.
| Option | Description |Required | Default | | ------------- |----------------------------|:------------------:|--------------| | --config | Path to config file. | Yes | by your input| | --format | config file format | No | json only now| | --types | custom chain type file | No | by your input|
Usage
Usage: subdata [options]
Options:
-V, --version output the version number
-c, --config <config> Path to config file.
-f, --format <format> config file format [default: json]
-t, --types <types> custom datatype from chain
-h, --help display help for command
Requirements
generate data uses a utility.batch method to speed up.To use this tool, you must add the utility pallet to your chain
DataType
The application utilizes Chance.js, so any data type supported by Chance.js is supported by subdata.
custom datatype
You can customize the data type at meta.datatype
, the format is: type-array
, such as the following:
{
"meta": {
"datatype": {
"website": [
"google.com",
"github.com"
]
}
}
}
Example
subdata -c configs/substrate.json