[parted-devel] DISCUSS: Script-friendly interface

Anant Narayanan anant at kix.in
Mon Jun 19 09:34:25 UTC 2006


Hello All,

>   1) in what way will the information be accessible?
>   2) what information is most necessary?

I would vote for having a mirror for all commands that users have access
to in the CLI frontend. All the information (except verbs and words used
to communicate exclusively with users) should be included. We should
leave it to the script to evaluate what information it needs and discard
the rest.

>   3) what format offers the both most solid and flexible way to present
>      the information?

I have been looking at this problem for a while now and it seems to me
that XML is a viable option for us to represent the necessary
information. Coupling the XML document itself with a nice DTD/Schema
would make the solution extremely generic, with no pre-requisite
information requirements on the scripts.

All major languages have in-built support for parsing XML documents.
C/C++ programs may use expat which is a library that is most likely to
be present on almost every system.

The down side of this is that XML is generally considered to be an
overkill for this kind of stuff, and everyone generally prefers a
pre-formatted text file.

> And as usual, please shout out loud is you wish to partitipate in the
> coding itself.

/me Shouts :)

Like I said before I was thinking of a set of commands that mirror all
commands available to users of the parted frontend. Better still (and
easier to implement) would be to add and optional argument `machine' to
every command, which when used outputs machine parse-able information
instead of the usual human-readable messages.

Awaiting your comments, suggestions and criticisms.

- Anant



More information about the parted-devel mailing list