Writing a new Rule - Alpha-Dev/Recodify GitHub Wiki
Rules are what control the output of crawling. Recodify will crawl for you however it is up to you on how to handle this information.
##Format
export class TestRule{
constructor(itemBody, itemName){
this.itemBody = itemBody;
this.itemName = itemName;
}
execute(){
console.log(this.itemName);
}
}
- TestRule is the rule name
- itemBody is the body of the file, your rule should parse this
- itemName is the name of the file, your rule should parse this, or the extension
- execute() is the required function. Called when the crawling is finished. Parsing code goes in here.
You should also write data to something like a database or excel spreadsheet.