XLSForm / pyxform

A Python package to create XForms for ODK Collect.
BSD 2-Clause "Simplified" License
77 stars 134 forks source link

`yxf` companion tool for conversion to yaml-based format #589

Closed Sjlver closed 2 years ago

Sjlver commented 2 years ago

Dear pyxform team, I'd like to draw your attention to a little tool I wrote, which might improve the experience of pyxform users. It's especially useful for users who manage many forms. yxf: https://github.com/Sjlver/yxf

yxf is a tool that converts forms from the XLSForm format to a text-based format. Both versions contain exactly the same information, but text files are a lot easier to store, compare, or bulk-update than spreadsheets.

The text-based format can be converted back into a valid XLSForm file. As a bonus, the result likely looks a lot prettier than the original.

To give an example: yxf allows you to go from this... Original XLSForm

... to this ... YAML version of the form

... and back to this: Prettier XLSForm

This is super cool (in my opinion) because it allows you to treat forms like code. You can now store them using a tool like git, easily compare them, perform bulk changes across many versions of a form, etc. For example, here is a comparison between two versions of a form, after a question has been made required: diff between two forms

yxf is in a very early stage of development. We welcome feedback, bug reports, and contributions. If you find yxf useful, let us know, too :)

Sjlver commented 2 years ago

One idea specifically for pyxform: The YAML-based format might be handy to improve pyxform's unit tests. I imagine that these tests contain several places where an XLSForm file is needed.

Currently, pyxform uses Markdown for this (example). I think that's a good idea, and it is more compact than yxf's YAML representation. The YAML-based format could be an alternative where readability is important.

lognaturel commented 2 years ago

That’s great! Please post at https://forum.getodk.org/c/showcase/10, we keep the issue list here focused on actionable tasks and it only reaches devs.

Sjlver commented 2 years ago

Done: https://forum.getodk.org/t/managing-odk-forms-just-got-so-much-easier/36804