Coder Social home page Coder Social logo

wq / xlsform-converter Goto Github PK

View Code? Open in Web Editor NEW
21.0 6.0 5.0 151 KB

๐Ÿ’ก๐Ÿ“‹ xlsconv: Command-line tool to convert questionnaires from Open Data Kit's XLSForm format into Django models and HTML (for use with https://wq.io/).

License: MIT License

Python 100.00%
wq-framework odk data-collection xform xlsform

xlsform-converter's Introduction

wq

wq is a modular framework for field data collection and surveys via offline-capable mobile web apps.

Getting Started

wq can be installed via GitHub, Docker, PyPI, NPM, or a <script> tag via CDN. See the documentation for more information on getting started.

Dev Container (recommended)

  1. Go to https://github.com/wq/wq-docker-template
  2. Select "Use this template" -> "Create a new repository"
  3. Open the dev container via GitHub Codespaces or Docker Desktop

Docker Base Image

docker run ghcr.io/wq/base:main

Python

python3 -m venv venv
. venv/bin/activate
python -m pip install wq
wq create myproject

Node

npm init @wq myproject

CDN

<script type="module">
    import wq from 'https://unpkg.com/wq';
    wq.init({});
</script>

Features

wq is made up of the following submodules, which are maintained as separate packages.

Module Github PyPI npm Description
wq wq/wq wq wq Top level package (specifies submodules as dependencies)
wq.app wq/wq.app wq.app @wq/app A JavaScript+Python library for building robust offline-capable HTML5 data entry apps.
wq.build wq/wq.build wq.build wq command line interface.
wq.create wq/wq.create wq.create @wq/create Project template and scaffolding tools.
wq.db wq/wq.db wq.db Django REST framework extension with design patterns for CRUD APIs.

xlsform-converter's People

Contributors

sheppard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xlsform-converter's Issues

multiple map support

Generate an appropriate multiple-map configuration for surveys with more than one geo field.

Field names must not end with an underscore

after running wq addform ~/survey.xlsx, i execute

`(django_env) D:\Development\Django\mysite\db>python manage.py makemigrations survey
SystemCheckError: System check identified some issues:

ERRORS:
survey.Survey.version: (fields.E001) Field names must not end with an underscore.`

any suggestions?

use AST for code generation

Replace templates/*.py-tpl with Python's ast module and format the output with black. This will help improve the maintainability and correctness of the code generator, and potentially enable intelligent merging with existing code (#3).

Workflow for XLSForms?

Dear Andrew,
As the hall of fame of applications is getting old (all of them over 2 years, it seems), and xlsform-converter fills a HUGE gap for easy questionnaire drafting and handling, I think it is high time to establish a clear work flow on how to handle XLSForm imports. Your installation instructions do include data model creation via XLSForms, but there is no information on repeated updates, repeated migrations, etc. I have the impression that I find a lot of unnecessary leftovers in the database after a few XLSForm installation attempts, so am deleting the entire database every time. Not very elegant, indeed!
What is more, and while the system does not throw any error whatsoever, and check runs fine, even with the simplest of forms, there is no synchronisation, nor any tables with actual content seen in the database. Locally, I do get incremental record numbers.
Most of all this are probably documentation issues, but the sheer lack of a whole work-up makes it really, really hard to get this system running.... even though it is the only one I know that has the potential to offer a solid escape from the ODK biotope!
Any help, thoughts would be hugely appreciated. I have by the way, protocolled as much as possible the set up and configuration process (for FreeBSD and jail), but got, again, stuck here, fighting essentially against looming (humanitarian) deadlines.
Thank you so much,
Chris

repeat section names should not need to end with "s"

Currently the class and field name generation assumes repeat groups will always be expressed in plural form (ending with an "s"). Figure out a way to refactor this so the plurality (and specifically "s") is optional.

Incompatibilities with newer pyxform versions

xlsform-converter uses the method parse_file_to_json from pyxform.xls2json in its parser.py file.
Newer versions of pyxform (>0.15.1) set the default_name to "data" in this method. This is apparently used by xlsform-converter as class name in the django app and also in the templates which is unwanted behaviour (maybe there are more changes that I didn't notice so far).

Setting the pyxform version to 0.15.1 would be a temporary fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.