rustxform-cli 0.1.1

Command-line interface for rustxform (XLSForm → XForm).
rustxform-cli-0.1.1 is not a library.

rustxform-cli

Command-line interface for rustxform: compile an XLSForm into an XForm. It validates the form, picks the reader by file extension, and writes the XML.

Install

cargo install rustxform-cli

This installs a binary named rustxform.

Usage

rustxform <input> [output] [--json] [--odk-validate <JAR>]
  • <input> — .md, .csv, .xlsx or .xls. The reader is chosen by extension.
  • [output] — defaults to the input path with a .xml suffix.
rustxform form.xlsx                 # writes form.xml
rustxform form.md out.xml           # explicit output path
rustxform form.csv out.xml --json   # machine-readable report on stdout
rustxform form.xlsx out.xml --odk-validate ODK-Validate.jar

Flags

Flag Effect
--json Emit a JSON report (status, output, warnings, errors) on stdout instead of plain text.
--odk-validate <JAR> After writing, run java -jar <JAR> <xform> to validate the output (needs Java on PATH).

Exit codes

  • 0 — the form compiled (any warnings are printed but non-fatal).
  • non-zero — the form is invalid (validation errors), the output was rejected by ODK Validate, or an I/O error occurred.

Validation errors are reported with their messages; a valid form with issues such as a missing form_title still compiles and prints the warning.

Example

Given age.md:

| survey |         |      |       |
|        | type    | name | label |
|        | integer | age  | Age   |
| settings |            |         |
|          | form_title | form_id |
|          | Age form   | age     |
$ rustxform age.md
wrote age.xml

License

Licensed under either of Apache-2.0 or MIT at your option.