All,
Relieved to see some talk of a text file format, which was one of the loudly
proclaimed but later abandoned promises of this project way back in the
beginning as I recall.
But still, it is very specific to gnucash.
What if I just want a list of transactions which can be easily imported into
another application ?
Or for that matter, what if I want to easily import data FROM another
application ?
That would seem to be the point of having a text format, no ?
BTW, just came back from seeing "Boiler Room" so I am dreaming about pushing
the numerical limits of gnucash (yeah right).
Cheers.
Rob Browning wrote:
> Dave Peticolas <[EMAIL PROTECTED]> writes:
>
> > We don't have a 'text import' function right now, but it shouldn't
> > be too hard to come up with a simple one using guile (scheme), which
> > GnuCash uses for scripting.
> >
> > If you'd like to work on this, please feel free to discuss your
> > plans on this list and ask questions.
>
> Well, we've already got the "text export" function, and other than
> only being able to dump to standard output right now, last time I
> checked, it worked fine (though I still need to fix the g-wrap
> long-long problem before we release). The reverse of this export
> function is similar to what Mike would need, and I'd be happy to go
> ahead and finish this up, but after thinking about the problem for a
> bit, I think we should step back and consider what we need.
>
> The original point of the "text export" mechanism was to capture a
> complete correct snapshot of an account group as text, in a way that
> could be easily reversed (via schme) to recreate the account group
> later. I think it probably does that now. It's not (as it stands) a
> format suitable for the importing that Mike wants since he wants to be
> able to specify changes to an account group rather than to specify a
> group completely.
>
> The reason that the current export file format (see the end of this
> message for an example from data/splitdemo.xac) is just scheme forms,
> rather than a set of scheme function calls that when executed would
> recreate the account group, is that this allows for more careful
> parsing and keeps it from being trivial to insert a nasty trojan horse
> into the data file (i.e. putting in '(system "rm -rf ~")' or similar)
> but this choice does make things less flexible.
>
> Right now, there's no reason why Mike couldn't just automatically
> generate a file that contains the relevant scheme code to add his new
> transactions and then fire up gnucash and "load" that file. We could
> even define some helper functions that make the "change file" contents
> nicer. Say something like this:
>
> (gnc:one-split-transaction-easy-add
> '(date "2000-12-02")
> '(check-number 1221)
> '(source-account "Checking")
> '(destination-account "Rent")
> '(amount 20.3))
>
> This function could automatically handle all the right account lookups
> and date conversions, build the transaction and split, insert it, etc,
> and unmentioned, optional fields would just get default values. The
> problem here is that load is dangerous for data files if you think
> people are ever going to be exchanging them.
>
> An alternate approach would be to define a limited syntax for the
> "import" files and write a simple limited evaluator (which is trivial
> to write in scheme) to handle the import. You could support something
> like this:
>
> (add-account <name> <type> ...)
>
> (add-transaction ...
> (split ...)
> (split ...))
>
> (delete-transaction ...)
>
> etc.
>
> Right now this seems like the right thing to do. What do other people
> think? If this is a good idea, I believe I can implement this quite
> quickly, and this same format would be quite appropriate for use in
> specifying scheduled transactions...
>
> --
> Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930
>
> --
> Gnucash Developer's List
> To unsubscribe send empty email to: [EMAIL PROTECTED]
--
Matt Martin
[EMAIL PROTECTED]
600 West Grove Parkway #1042
Tempe, AZ, 85283
(480) 775 2660
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]