File export and year end data reduction

Derek Atkins warlord at MIT.EDU
Tue Jan 2 10:16:08 EST 2007


I'll remind people of this script by Jon Kamens:

  https://lists.gnucash.org/pipermail/gnucash-user/2005-January/012817.html

Before you go off and re-invent the wheel....

-derek

Quoting John Griessen <john_g at cibolo.com>:

>
>
> Bob Allen wrote:
> using your favorite editor find the first line starting
>> <gnc:transaction....
>> and the find the last line starting   </gnc:transaction....
>>
>> and delete everything in between including those lines.
>
> This is a good method for closing at year end.  It takes away any mistakes
> coming from improper paying of invoices payable, and reduces the size of the
> data file so it's managable to load, while preserving customer info.
>
> It keeps all invoice entriess though.  I find old invoices helpful to have on
> hand, but not all, so I am making an improvement on Bob Allen's data reducing
> year end idea.>
>
> It will be a python script to use python XML features so I can search for all
> </gnc:GncEntry> . . .   </gnc:GncEntry>    XML stanzas, and delete 
> the ones in a
> certain time period.  My program will be low on data storage space used, and
> just decide what to winnow out, storing one </gnc:GncEntry>  . . .
> </gnc:GncEntry>    XML stanza at a time, then writing out to a new file, and
> going through the whole .gnucash file.  It will take a command line argument
> that is the date year and month or many of those, so running it will 
> look like:
>
> gnucash-yearend-winnow  2005-08 2005-07 2005-06 2005-05 2005-04 2005-03
> file1.gnucash
>
> and output to a file named file1.out.gnucash
>
>
> To winnow again and take out more, just repeat using the output file. 
>   When it
> loads and looks good in gnucash, rename it and start using it as your 
> data file.
>  This can be done again at any later time, so deleting all 
> transactions is the
> only critical thing to do at year end, then adjust all the starting balances,
> then do some data file winnowing whenever you have time.
>
> My python script should be ready for all to use in a few days.
>
> John Griessen
>
> PS  Anyone in a rush can send me some tip money...and have the results to use
> forever as GPL'd FOSS.
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>



-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-user mailing list