CLI jigadmin [was Re: Proxy Configuration Problems]

> Isn't there any way to do completely without GUI when configuring
> Jigsaw? I would like to be able to configure it from a text terminal
> like xterm, for example by editing config files.

I had the same need a while ago, so I started a CLI interface. I then
got a bit busy, and had some students work on it. But the result is
not yet usable. The general idea is to consider the jigsaw resource
tree as a filesystem, and have something similar to a classic UNIX
shell to administrate it. This shell should only use the JigAdm API,
which should evolve more slowly than the underlying storage system.

Here is a (genuine) example session:

aubert@salt:~/install/jigadm>./admin
/>sic start ("http://localhost:8009", "/home/aubert/install/Jigsaw/Jigsaw");
Starting new connection to http://localhost:8009/
/Root>ls
---@-  control
C--@-  http-server
C--@-  realms
--Ff-  auth-frame
----A  identifier
----A  frames
----A  last-modified
----A  help-url
----A  oid
/Root>cd http-server
/Root/http-server>ls
---@-  control
CD-@-  docs_space
C--@-  indexers
C--@-  properties
C--@-  realms
----A  identifier
----A  frames
----A  last-modified
----A  help-url
----A  oid
/Root/http-server>cat identifier
http-server

etc...  The code is a mix of java and ECMAscript, with a dedicated
parser used in interactive mode. You can also make scripts like:

function 
adduser (name, pass)
{
  cd("/realms/JigAdmin");
  putr ("org.w3c.jigsaw.auth.AuthUser",name);
  cd (name);
  set("password",pass);
}

function 
add_users_from_file (file)
{
  _f = new File (file);
  _f.open ();
  ligne = _f.readln ();
  while (ligne != null)
    {
      tab = ligne.split (":");
      adduser (tab[0], tab[1]);
      ligne = _f.readln ();
    }

}

This one used to work with an older version of jigsaw. It does not
work anymore :-(.  There are other issues (how to set a frame order
for instance), but I think it could be done. If somebody is
interested, just get in touch with me (if you're not afraid of some
ugly ecmascript code with little documentation...).

One of these days, I'll polish everything and write some
documentation. But not anytime soon.

Olivier

Received on Wednesday, 19 January 2000 09:56:22 UTC