(cc'ing this to devel - technical discussion)
Rob Browning writes:
<implementation of --evaluate snipped>
>
> With this you can do silly things like:
>
> gnucash --evaluate '(display "Hello world.\n") (gnc:shutdown 0)'
>
> or
>
> gnucash --evaluate '(display "Hello world.\n")'
> --evaluate '(gnc:shutdown 0)'
>
> and get what you'd expect.
>
Cool.
> This is only the first step, though. We need some helper functions to
> make normal things easier and safer. For example, right here,
> --evaluate just evaluates the code a the point where the argument is
> reached during argument processing. In general, I think we want it to
> do that (or at least we may want some way to do that), but we should
> also have some way to do the simple things easily. For example, right
> here calling gnc:shutdown may or may not be what we really want. We
> may want something more analogous to perl's -p and -n options that
> handle putting a sensible startup and shutdown process around the code
> given, something like this:
>
> gnucash --evaluate '(gnc:batch-startup) (do-something) (gnc:batch-shutdown)'
>
> but perhaps with a shorter way to say it.
>
Agreed. This is exactly what I had in mind.
<snip>
> For the command line arguments, I want something much more user
> friendly. We may need both a low-level --evaluate, and something
> higher-level as well...
>
> Thoughts?
As soon as I have some, I'll let you know :)
Seriously, I'm hacking away at something else ATM (a tip of the day
implementation, actually). When I finish playing with it for the day,
I'll have a look at your patch.
Is the server melted yet?
------------------------------------------------------------
Robert Merkel [EMAIL PROTECTED]
------------------------------------------------------------
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]