gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] raw


From: Rob Weir
Subject: [Gnu-arch-users] raw
Date: Fri, 2 Jul 2004 08:20:03 +1000
User-agent: Mutt/1.5.6+20040523i

Hey all,

here's a little hack I've been working on for a while now: raw.  It's
one part interactive tla shell, one part scripting framework for tla,
all written in python and based on the quite excellent pyarch.  I see it
as a way to implement a higher-level interface on top of tla, and for
prototyping new tla features.

First of all, DO NOT USE IT ON ARCHIVES YOU CARE ABOUT.  It's not well
tested enough for me to want other people to trust their important data
to it.  Since it wraps tla, it's very unlikely to cause data loss, but I
wouldn't want to have to remove a dud revision from an archive, etc...

Second of all, please play with it.  It has little documentation except
for the built-in help strings (which could do with expansion, patches
welcome:) and the source code, but there is a bunch of example code.

Lastly, a few notes:

* raw has two modes: interactive and non-interactive.  "raw help" will
  list available commands, as will "help" while inside raw.  "raw help
  foo" will show the help for the "foo" command.

* raw commands are implemented as descendants of the raw.raw.Command
  class.  They implement a bunch of methods, which the raw shell calls
  as appropriate.  Have a look at the "foobar" command for examples of
  what each should do.  Commands can take command-line flags
  (--whatever), using optparse.  The foobar command has an example of
  this, too.  A short-term TODO item is for raw to load a file from
  ~/.raw/ or so containing local command customisations.

* raw has the concept of "settings".  commands can declare config
  options that they care about and then store them in ~/.rawrc.  Most
  settings have default values, but if it's None then the user will be
  prompted for a value when it's needed.

* raw has the concept of "projects" (which will be renamed to profiles).
  "settings" are (can be...if no project is specified, the DEFAULT
  settings are used globally) stored per-project, and my-id is set
  pre-project using a very dirty hack.  Have a look in
  ~/.raw/projects/<bah> to see how it's done.  There is currently no UI
  to change the my-id, but you can edit it manually.  "raw new-project"
  makes a new project, with default settings.  In the short-term, UI
  will be added to let you derive a new project from an existing one.

Install:

$ mkdir raw ; cd raw
$ tla register-archive http://egads.ertius.org/~rob/2004-arch/
$ tla get address@hidden/raw--release--0 ./raw
$ tla get address@hidden/pyaba--release--0 ./pyarch
$ export PYTHONPATH=$PYTHONPATH:`pwd`/pyarch/:`pwd`/raw/lib/
$ ./raw/raw

-- 
Words of the day:          Mole e-bomb 9705 Samford Road Cheney overthorw AIMSX




reply via email to

[Prev in Thread] Current Thread [Next in Thread]