I’ve been working on a project to make building forms really simple. My latest work is “jsonwidget-python” for terminal-based applications (like you would use via SSH or local terminal on Linux and Mac). It’s all very retro, but terminal windows are still very much in use for buzzword-compliant activities like configuring virtual machines for cloud computing, in addition to being the preferred user interface for a lot of people out there (*cough* nerds *cough*).
Here’s a simple screenshot to show what’s going on:
One nice feature on display even in the simple demo is the ability to have arrays as fields. You’ll notice that the phone number field has two phone numbers, and offers to let you add a third. There’s no artificial limit on the number of phone numbers that one can enter using this tool, beyond the usual limits of computer memory, patience, etc.
It also handles more complicated schemas if your application calls for it. For example, let’s say that one wanted to build a real address book application. Clearly a lot more flexibility would be needed than merely allowing multiple phone numbers. Here’s a screenshot showing a much more sophisticated schema that’s more like what real address book applications allow:
So, what is this good for? Well, I think it’ll be good for a lot of stuff. I suspect it might be a very good user interface to stick in front of a augeas-based user interface. I think it might also be a good tool for building a terminal-based frontend for editing CouchDB and similar databases. In particular, I’m thinking about making a desktop-couch interface for contact editing. Another idea I’ve dabbled with is automatically building a UI based on parameters to Python’s optparse. Yet another thought is an editor for Python’s ConfigParser or alternatively ConfigObj. Lots of different possibilities here.
I’m particularly interested in suggestions for applications that people would use. So, if you have an application for this type of thing that you’re reasonably sure you’d use if I did a good enough job implementing, let me know.
Of course, that’s probably getting a little ahead of myself. There’s a number of things on the roadmap to do, such as more kosher packaging for easy_install and for Linux distros, as well as the ability to edit arbitrary JSON. I also need to investigate SitePen’s JSON schema work, which they appear to be well along toward some sort of RFC (probably informational, but that can be enough for something like this).
Anyway, if this sort of thing is up your alley, please give it a whirl and let me know what you think. You can download jsonwidget-python and give it a spin. I’ve set up a jsonwidget mailing list which you’re more than welcome to use, but you can also just post a comment here or contact me via email.
Update: March 9 – there’s now several ways of getting jsonwidget:
2 thoughts on “Easy form building for terminal windows: jsonwidget-python”
Great post! You really made a point here. Data entry with jsonwidget-python is too complicated even for me.
Heya i’m for the primary time here. I found this board and I to find It truly helpful & it helped me out much. I hope to give one thing back and aid others such as you helped me.