Tool to convert ODK-style XLSForms into Django models and HTML templates for use with wq (https://wq.io/)
Project description
xlsform-converter converts surveys defined via the XLSForm standard into Django models and HTML5 Mustache templates. This makes it possible to re-use the powerful form building tools provided by the Open Data Kit ecosystem, while leveraging Django’s robust support for relational databases like PostgreSQL.
xlsform-converter is designed to facilitate the rapid development of offline-capable data collection apps via the wq framework. The ultimate goal is to provide full compatibility with the form authoring tools provided by ODK (and Enketo, etc.). Note that this is not the same as full XForm compatibility: the client and server components of wq (wq.app and wq.db) use a JSON-based REST API to exchange data and are not directly compatible with their ODK Analogues (ODK Collect and ODK Aggregate, respectively).
Usage
pip3 install xlsconv
# Use the default models.py template
xls2django my-odk-survey.xls > myapp/models.py
# Use a custom template
xls2django my-odk-survey.xls my_templates/models.py > myapp/models.py
# Use the default form.html template
xls2html my-odk-survey.xls > templates/survey_form.html
# Use a custom template
xls2html my-odk-survey.xls my_templates/form.html > templates/survey_form.html
If you are using wq, you may be interested in wq.start, which uses xlsconv internally for the wq addform and wq maketemplates commands.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.