Re: Motoc & Motoi

David Hakim <dhakim-Gkm/TONP9n1Wk0Htik3J/[email protected]> Wed, 13 Aug 2003 21:03:11 -0400
Newsgroups gmane.comp.lang.moto.devel
Message-ID <[email protected]>
On Monday, August 4, 2003, at 04:12  PM, Stefano Corsi wrote:

> Hi Dave,
>
> did you give a look at the motoc script?

I didn't see it in my email. Could you re-send ?

> Could we introduce in in the next
> release together with a motoi link to moto -i or a wrapper motoi 
> script?
> Since I copied it in /usr/bin I have found it more and more useful!
>
I think motoc and motoi binaries may make for a very nice interim 
release. I'd like to think through their design  some first. The one we 
have thought and discussed most in the past is motoi. The key to that 
tool being the ability to support running scripts not only by passing 
the script name as the first argument to motoi but also through 
including

#!/usr/bin/moto

at the top of the moto script itself and letting moto pages be executed 
from the cmd line directly. This would be the first step towards a lot 
of new features most importantly allowing moto pages to be run as cgi 
scripts.

> A related question: what aboud command line arguments?! Any way to 
> pass them
> to a moto script?
>
Not yet because the arguments to the current moto cmd line binary are 
the moto scripts to execute / generate code for. With the advent of a 
motoi script (and standalone compiled moto scripts) we should 
definitely have an extension ready to access the cmd line args.

The extension function I'm thinking of would just be something like 
getArgs[] or Runtime.getArgs() and would return a String[] of the cmd 
line arguments. The function / method would need to be part of the moto 
extension since the getArgs function will need access to an array of 
arguments motoi (or the 'main' function  in compiled moto scripts) sets 
up.

-Dave

> Stefano
>