[GNC] How to bulk import about 130 Securities entries?
David G. Pickett
dgpickett at aol.com
Tue Aug 16 17:01:29 EDT 2022
As xml is text, and xml storage is used in my gnucash, one might add securities by running the *.gnucash through gunzip, add in the text, and run it back through gzip, unless there is a nasty checksum in there somewhere? Keep a copy of the original!
I pulled this from my file using shell tools, first for SPY SPY SPY 1000 in namespace AMEX with quotes from yahoo_json. id is Symbol, name is Name, value is Display Symbol. I don't use ISIN or TimeZone, but you can make a test security and look in the file if you want these fields:
gunzip <GnuCash/ubuntu-DGPickett.gnucash | less . . .
<gnc:commodity version="2.0.0"> <cmdty:space>AMEX</cmdty:space> <cmdty:id>SPY</cmdty:id> <cmdty:name>SPY</cmdty:name> <cmdty:fraction>1000</cmdty:fraction> <cmdty:get_quotes/> <cmdty:quote_source>yahoo_json</cmdty:quote_source> <cmdty:quote_tz/> <cmdty:slots> <slot> <slot:key>user_symbol</slot:key> <slot:value type="string">SPY</slot:value> </slot> </cmdty:slots></gnc:commodity> . . .<gnc:commodity version="2.0.0"> <cmdty:space>FUND</cmdty:space> <cmdty:id>31617E620</cmdty:id> <cmdty:name>FID GROWTH CO POOL CL 3</cmdty:name> <cmdty:fraction>1000</cmdty:fraction> <cmdty:slots> <slot> <slot:key>user_symbol</slot:key> <slot:value type="string">FGCP</slot:value> </slot> </cmdty:slots></gnc:commodity> . . . .
A csv import would be nice, though!
More information about the gnucash-user
mailing list