Trans, thanks I had a look at their mailing list and they had a few
nice examples of how something like this can be used, some of which
are included here:
* methods added to filetypes
* >> somesong.mp3.play
* >> some.jpg.rotate(90).view
* >> somefile.extension.defaultopen("/usr/bin/somebinary")
* >> somefile.extension [which would open it using somebinary]
* custom global objects
* >> db.somedatabase.sometable.find_all [active_record could be used here]
* >> apache.config.port = 81 [Not sure how this would work ?
read/write the .conf file ?]
* >> apache.restart
* >> samba.config.global.security = user
Unfortunately *nix config files dont follow some sort of standard like
xml, which could have make this alot easier.
Then obviously chaining of commands
* [grep something] | invoke a graphing application which will show
the number of ocurrances by filename with a bar chart
* gimp.applyfilter(gimp.filters.blur) | email.send("blured
There was a suggestion of using opengl for the command line, which
could add some nice functionality:
* The cli then becomes more of an ide, a combo box could be popped
up for command suggestions instead of the usual list of commands which
* images could be displayed on the cli iteself
* a nice graph of the chained commands could be displayed with each
command's projected inputs and outputs for the current fsm [Could be
generated by doxygen]
I think this would be a nice project to help unify available
applications/libs on *nix.
jm, the very simple commands included in my previous post are:
class Ls < Command
args = "*" if args == ""
$objects = Dir.glob(args)
class Bracket < Command
They can then be used by doing
ls *.rb | b | b
which would print out all the .rb files each having two brackets around them.
The basic idea currently uses a global $objects to keep track of the
current objects, which I'm not yet convinced is the best solution.
Anybody interested in something like this ?
On 8/18/05, Trans <email@example.com> wrote:
There's been some discussion on this with regards to R:O:S. You might
want to dig that up on Rubyforge.