The program interface definition framework

The program interface definition XML schema, XSLT stylesheets and tools allow you to generate all the code required to handle command line arguments in a command line based tool. It can also build a XUL frontend to call any command line program.

Rationale

Writing a command line tool is generally faster (and lighter) than starting to build a full graphical user interface. However, since good tools have many options, dealing with those can be a really tedious, boring and repetitive work. For any program you plan to share or to use more than a couple of time, you will have to

You may also plan to write the bash auto-completion, the man page or the wiki page of your tool if it becomes really popular!

In shell script, the amount of code to handle that can easily exceed the useful part of your program. getopt and getopts tools may help a bit but you still have to check a lot of things after.

More advanced languages may provide libraries or utility functions, but they generally does not go further than checking the syntax of the command line arguments. They also may add unnecessary dependencies to your tool.

The purpose of the ns-xml program interface definition framework is to let you define your command line options specifications, then generates all that boring things automatically.

How it works

A little tutorial is worth a thousand words... Let's see how we can manage options in UNIX shell or in Python. How it works

Table of contents