UsageΒΆ
Installation of odk2stata
provides two command line scripts.
The first command line script launches a GUI:
$ odk2stata-gui

The second runs the command line interface (notice here the added -h
flag to get help messaging):
$ odk2stata -h
usage: odk2stata [-h] [-s SETTINGS] [-d {briefcase,aggregate,no_groups}]
[-o OUTPATH] [-V]
xlsform
Generate a configurable do file from an XlsForm.
positional arguments:
xlsform The XlsForm to analyze.
optional arguments:
-h, --help show this help message and exit
-s SETTINGS, --settings SETTINGS
The settings file. If not supplied then sensible
default settings are used. Access those with "python3
-m odk2stata.dofile.settings" on the command line.
-d {briefcase,aggregate,no_groups}, --dataset_source {briefcase,aggregate,no_groups}
Where does the data come from? The option "no_groups"
is for data where the groups have been stripped out.
Default is "briefcase".
-o OUTPATH, --outpath OUTPATH
Where to save the do file. If not supplied, then the
do file is written to STDOUT.
-V, --version Print the software version and exit
Common usage for odk2stata
looks like:
$ odk2stata -s configuration.ini /path/to/odk/form.xlsx -o /path/to/output/form.do
The configuration.ini
is a configuration file and will be described later.
The command line takes the path to the ODK file and a specified output file. If no output path is supplied, then
the resulting do file is printed to standard out.