Closed Sjlver closed 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.
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.
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/yxfyxf
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:![Original XLSForm](https://user-images.githubusercontent.com/72059/154990572-a14b23ab-706b-4087-aa23-692b65b41551.png)
yxf
allows you to go from this...... to this ...![YAML version of the form](https://user-images.githubusercontent.com/72059/154990627-d563ad4c-2392-410e-a87f-376acfa6963e.png)
... and back to this:![Prettier XLSForm](https://user-images.githubusercontent.com/72059/154990669-fb227e7e-655e-4f24-b97c-b36f04956eea.png)
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](https://user-images.githubusercontent.com/72059/154990721-d49ed6a3-1ec0-4093-aec5-74b19946b577.png)
yxf
is in a very early stage of development. We welcome feedback, bug reports, and contributions. If you findyxf
useful, let us know, too :)