> On Aug 16, 2022, at 2:11 PM, Robert Simmons <rsimmo...@gmail.com> wrote:
>
>> running the *.gnucash through gunzip, add in the text, and run it back
> through gzip
>
> As a connoisseur of bad ideas for adding data to GnuCash myself, I have to
> point out that one should use a programming language that has a library
> with support for the structured data format that one wants to add to. You
> use the parser provided by the language to generate objects in that
> language. You then perform operations on those objects. Finally, you use
> the library function to emit well formatted structured data.
Not that I would suggest altering your GnuCash data outside of the GnuCash
library...
Gnome's libxml2 XML library is reasonably comprehensive, widely supported with
bindings, and
one heck of a lot less weighty than the Apache equivalent.
You also don't need to re-gzip the file. As long as you don't break anything
GnuCash doesn't care
whether it's gzipped or not.
OTOH I'm pretty sure that gnc_commodity is fully exposed to the Python bindings
so you should
be able to write a python script using them to do the same thing without
voiding your warranty
or needing to unzip the file or, for that matter, caring which backend is used.
Regards,
John Ralls
_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
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.