Rob Walker <[EMAIL PROTECTED]> writes:

> yes!  please, please get them out in ASCII.

Well, if we go with my previous suggestion, spitting out plain ASCII
should be trivial, and depending on what you want to do, since the
report itself would be (text) scheme forms, you could write scripts to
do process the data from your reports in plain old guile (or any
scheme implementation) with very little effort since reading in the
data and doing something to each transaction should be as simple as:

  (with-input-from-file "my-report.gncr"
    (lambda (port)
      (let ((all-transactions (read port)))
        (map do-something all-transactions))))

This would work if the file just contained a list of all the
transactions:

  (transaction-1
   transaction-2
   transaction-3
   transaction-4
   ...)

We'd probably want something a little more complex than that, but you
get the idea.  Also, if we didn't want to force the user to read in
*all* the data at once (i.e. allowing them to save RAM by reading one
transaction at a time), then the file could contain the transactions
without an enclosing list

  transaction-1
  transaction-2
  transaction-3
  transaction-4
  ...

and then the processing would look like this:

  (with-input-from-file "my-report.gncr"
    (lambda (port)
      (do ((transaction (read port) (read port)))
          ((eof-object? transaction))
        (do-something transaction))))

etc.

-- 
Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930

--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]

Reply via email to