Extracting Account names [was Re: Re[2]: German Translation of Tool]

Paul Lussier pll@mclinux.com
Thu, 03 Jan 2002 10:41:43 -0500


In a message dated: Thu, 03 Jan 2002 08:08:11 MST
Rusty Carruth said:


>> *sigh* Yeah. I am busy converting all my account names right now. Can I do a
>> regex replace on the XML files? ;-)
>
>I'd like to know if the following is a 'safe' way to do what you are asking,
>but differently than you probably thought ;-)
>
>Here's the scheme:
>
>copy your current guncash file to a new file (I seem to only have one 'real' 
>file for my accounts, with lots of logs and such also - am I correct?  If not,
>then copy ALL the needed files to a new name).
>
>Then, you can use xemacs, sed, awk, perl, or whatever you wish to modify
>your xml file(s).

Use "File->Export Accounts" to export your list of accounts only to 
an XML-based file.  You can then name it whatever you wish, and open 
that file within GnuCash.

I set up my initial list of accounts, exported it to gnc2000.xac, 
then over the year populated it.  When the time came for the 2000-2001
transition, I again exported the accounts to gnc2001.xac, and began 
inputting data.  That time is here again :)

As for getting just an ASCII listing of the account hierarchy, you 
could run perl, sed, awk, or use emacs on the exported XML file.

This is something I've been meaning to do, but just haven't gotten 
around to writing the perl script to do it.
-- 

Seeya,
Paul
----

			  God Bless America!

	...we don't need to be perfect to be the best around,
		and we never stop trying to be better. 
		       Tom Clancy, The Bear and The Dragon