These scripts are used to generate the XML data available in the Cricsheet XML project.
You can manage the dependencies using Bundler. Once you have it installed you can install the dependencies using:
$ bundle install
convert.rb is a ruby script, which can be configured using command-line arguments. See
./convert.rb --help for all available options.
validate.rb is also a ruby script, which cannot be configured. It simply takes a list of XML files to be validated against the schema, and outputs any errors it finds for each file.
In all of the examples that follow the resulting XML will be saved with with a
.xml extension. For example,
foobar.yaml will be converted to
Convert a single YAML file, and save the resulting XML into the default output folder (
$ ./convert.rb data.yaml
Convert the provided YAML files, and save the resulting XML into the default output folder (
$ ./convert.rb *yaml
Convert the provided YAML files, and save the resulting XML into a specified folder.
$ ./convert.rb -f some/other/folder 1.yaml 2.yaml
Validate a single XML file against the schema.
$ ./validate.rb data.xml
Validate multiple XML files against the schema.
$ ./validate.rb data.xml other_data.xml
Thanks to Rob Mohseni for the initial version of the schema file, which I then extended. Without his efforts the XML version would never have happened.