Closing the books

Mark G. Woodruff markgwoodruff at yahoo.com
Wed Aug 10 16:44:35 EDT 2005


Until Gnucash has filtering, if you pull down
Object-Rexx, you can filter transactions with the
following:

/* filter transactions from a gnucash file */
/* rexx filter.rex < gnucashFile > filteredGnuCashFile
*/

Do While Lines() \= 0
    Parse Pull line
    If line = '<gnc:transaction version="2.0.0">' Then
Do
        throwAwayBuffer = 0
        buffer = line
        Do While line \= '</gnc:transaction>'
            Parse Pull line
            If line = '<trn:date-posted>' Then Do
                buffer = buffer || line
                Parse Pull line
                Parse Var line '<ts:date>' date

                If date < '2005-01-01' Then
                    throwAwayBuffer = 1
            End
            buffer = buffer || line
        End
        If \ throwAwayBuffer Then Do
            Say buffer
            throwAwayBuffer = 0
        End
    End
    Else Say line
End




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the gnucash-user mailing list