You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Jason Horman <jh...@musicmatch.com> on 2002/10/03 19:49:27 UTC

[jelly] usage, output file

Usage: Jelly scriptFile [outputFile]
 
My Jelly scripts do not output anything. They do take input parameters. The
report below take a date as an import parameter and then executes sql, etc,
based on that date. I end up with an empty file called 20020922 after each
run.
 
Would it not make more sense to have the usage be:
 
Usage: Jelly scriptFile [-o outputFile] scriptParams
 
It looks like http://jakarta.apache.org/commons/cli/introduction.html
<http://jakarta.apache.org/commons/cli/introduction.html>  could help.
Actually, if jelly could then make the CLI objects available instead of
"args[]" then the scripts could be passed "-date 20020922" options.
 
jelly databuild.jelly 20020922
 
<jelly xmlns="jelly:core" xmlns:log="jelly:log" xmlns:bsh="jelly:beanshell"
    xmlns:ant="jelly:ant" xmlns:sql="jelly:sql">
 
    <set var="date" value="${args[1]}"/>
    <log:info> building ${date} </log:info>
 
</jelly>
This email message and any attachments are for the sole use of the intended
recipient(s) and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient or his/her representative, please contact the
sender by reply email and destroy all copies of the original message.

Re: [jelly] usage, output file

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Jason Horman" <jh...@musicmatch.com>
> Usage: Jelly scriptFile [outputFile]
>
> My Jelly scripts do not output anything. They do take input parameters.
The
> report below take a date as an import parameter and then executes sql,
etc,
> based on that date. I end up with an empty file called 20020922 after each
> run.
>
> Would it not make more sense to have the usage be:
>
> Usage: Jelly scriptFile [-o outputFile] scriptParams
>
> It looks like http://jakarta.apache.org/commons/cli/introduction.html
> <http://jakarta.apache.org/commons/cli/introduction.html>  could help.
> Actually, if jelly could then make the CLI objects available instead of
> "args[]" then the scripts could be passed "-date 20020922" options.
>
> jelly databuild.jelly 20020922
>
> <jelly xmlns="jelly:core" xmlns:log="jelly:log"
xmlns:bsh="jelly:beanshell"
>     xmlns:ant="jelly:ant" xmlns:sql="jelly:sql">
>
>     <set var="date" value="${args[1]}"/>
>     <log:info> building ${date} </log:info>
>
> </jelly>

I'd love the Jelly command line to allow options such as the output file to
be specified then allowing other arguments to the script to follow as you
describe.  It'd also be nice to specifiy properties on the command line
too...

    jelly foo.jelly -o somefile.txt -Dsomething=1234 arg1 arg2 arg3

This would rock. Fancy having a go at implementing it? :-)

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>