xlson - Converts an OpenSRP data dictionary XLSForm into native form JSON.
git clone [email protected]:OpenSRP/xlson.git
xlson
can be installed by running python setup.py install
. It requires Python 3.6.0+.
Consider using a virtualenv and virtualenvwrapper
to make dependency management easier
pip install virtualenv pip install virtualenvwrapper mkvirtualenv xlson_local # or whatever you want to name it (xlson_local)$ python setup.py install # install the required packages required
xlson
takes an XLSForm e.g sample.xlsx
as input and outputs a native JSON formatted string to stdout. An example:
xlson sample.xlsx > sample.json { "encounter_type": "sample", "step1": { "title": "Patient Information", "fields": [ { "key": "first_name", "type": "edit_text", "openmrs_entity": "", "openmrs_entity_id": "", "openmrs_entity_parent": "", "edit_type": "name", "hint": "What's your first name?" } ] } }
From the sample XLSForm below:
type | name | label |
---|---|---|
begin group | step1 | Patient Information |
text | first_name | What's your first name? |
end group |
See more on xlson
specifications.rst.
See CONTRIBUTING.rst for details.