On Mon, 2005-08-29 at 12:33 +0200, 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. Can I just insert the new > account-subtree into the xml-file without blowing up everything? How > do I get a valid 'act:id' value for a new account?
Yes, you can. It will be important to understand gnucash's concepts of "type" and "commodity" first. The accounts form a tree via parent-pointers (by GUID), so that must be respected. Account ID's are simply GUIDs; in gnucash, GUIDs are hex-encoded strings of MD5-generated random values. They do not have any internal structure or semantic. Any sufficiently-random source of data will work to reduce the chance of natural collisions with existing GUIDs. See [1] for the gory details. Certainly, you should only work on a data-file backup and test it out before entering Important Data. > Andreas Fromm ...jsled [1] http://cvs.gnucash.org/cgi-bin/cvsweb.cgi/gnucash/src/engine/guid.c?rev=1.25.4.9;content-type=text%2Fplain -- http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo [EMAIL PROTECTED] _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
