Expand description

dfraw_json_parser provides a way to turn raw files from Dwarf Fortress into JSON. It functions using a regular expression to break apart the tokens and then checks the key in the token against a long list of ones it knows about. Any matches are utilized to build its own representation of the raw before a final step where it dumps it to JSON.

Currently the only raws that are parsed are Creature raws.

Currently the JSON is returned as a string

Functions

Parse a directory of raws, and return a JSON string of the parsed raws.
It takes a path to a DF game directory, and returns a JSON array of all the raws in that directory
Takes a path to a folder containing raws, and a path to a file, and parses the raws and saves the result to the file as JSON
Takes a path to a directory of raws, and a path to a file, and parses the raws into JSON and saves as the file.
Parse a directory of raws, and return a JSON string of the parsed raw module info files.
Given the path to the game directory, returns a vector of JSON strings of object representing a raw module. This returns the JSON for every detected raw module in all tested directories.
Takes the path to the DF game directory, parses the raw module info files and then writes the JSON strings of those parsed modules to the out_filepath