A service to serve rule information
There are two major xlsx files to serve as data source
- normalized_rule_map.xlsx (rulesets/path messages)
- RuleSetMaster.xlsx (rule information)
This service will convert these two files into .csv then calling csvreader executable file to convert json and
store in data/output/
First time pull
$>git submodule update --init --recursive
Later pull recursively
$>git submodule update --recursive --remote
A tool to transform csv to json
- Latest source code of v2csv: https://github.com/xcalcc/v2csv.git
- Precompile the csvreader before generating data
$> yarn compile-csvreader
$> yarn gen-data
$> yarn validate-data
$> yarn start-dev
$> yarn start
$> yarn test
$> docker-compose up --build
For extra rules, set EXTRA_RULE_FILES
in env file, separated by ",", prepare folders accordingly in /data/output/miscellaneous/input/
, put
rules_cn.json
and rules_en.json
💥 Custom rule will be based on project id |
---|
Each Xcalscan ready project will have a folder called .xcalscan-rules, inside which there will be a rules.json, and .mi file, rule service will always store the json and save it with gzip compression |
For custom data serving, normally you need to provide a project ID to retrieve back the rule info |
- Add a tab in rule master table meets the format requirements as other standards
- transformer.js add new entry to read new tab
- output csv add record
- convertingJson add new argument for the tab
- Add new class for the standard