creating accounts by hand in the xml-file
Neil Williams
linux at codehelp.co.uk
Mon Aug 29 07:02:41 EDT 2005
On Monday 29 August 2005 11:33 am, Andreas Fromm wrote:
> I would like to write a tool that creates a list of accounts in
> gnucash based on a list of names I pass in.
CashUtil will enable this functionality:
http://www.linux.codehelp.co.uk/cashutil/
It is nowhere near as simple as you may expect.
> Can I just insert the new
> account-subtree into the xml-file without blowing up everything?
No - it's unlikely that you'll find the new accounts when you load the file
because you need to get the relationships and hierarchy in place.
GnuCash will try to ignore accounts that are not correctly inserted - but if
you simply hack the XML it's likely that you'll create a set of account
groups that GnuCash simply cannot understand.
> How
> do I get a valid 'act:id' value for a new account?
1. Create within the GUI.
2. Wait for CashUtil.
3. Write your own QIF format file, possibly.
I can't recommend hacking the XML directly - cashutil loads the XML using
GnuCash C code and the QOF library and this is the only reliable method,
other than the existing GUI.
--
Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20050829/195249fc/attachment.bin
More information about the gnucash-devel
mailing list