I recently found the need to add a new stock which is traded on the TSX (Toronto Stock Exchange). Why do we hard-code commodity sources? I don't want to have to recompile to use a new exchange.
Phil On Tue, Aug 11, 2015 at 4:01 AM, John Ralls <[email protected]> wrote: > > > On Aug 11, 2015, at 8:27 AM, Geert Janssens <[email protected]> > wrote: > > > > On Monday 10 August 2015 16:29:25 John Ralls wrote: > >>> On Aug 10, 2015, at 3:16 PM, Ngewi Fet <[email protected]> wrote: > >>> > >>> Hello everyone, > >>> Could someone point out to me where the commodities list is found in > >>> the repository? > >>> > >>> I tried searching the repo and can find code which seems to indicate > >>> that there is a file which is loaded into the database on > >>> application start. But I cannot find the list itself. > >>> > >>> I would like to initialize the Android app with the same list of > >>> commodities as the desktop version. > >>> Thanks. > >> > >> There’s a currency list in src/engine/commodity-table.scm which holds > >> the ISO currencies. All other commodities are user-defined. > >> > > I wasn't aware of that file. Upon inspection it contains a list of > > commodity sources (CURRENCY, NASDAQ,...). > > > > As Derek replied the iso currencies themselves are in > > src/engine/iso-4217-currencies.xml > > > > At build time this xml file is translated into a c source file via xslt, > > using > > src/engine/iso-currencies-to-c.xsl > > Sorry, I stand corrected. I’d forgotten that we’d changed the currency > table from scheme to xml in 2.6 and went looking for a scheme file. Guess I > should have looked *in* the scheme file before saying anything! > > Regards, > John Ralls > > > _______________________________________________ > gnucash-devel mailing list > [email protected] > https://lists.gnucash.org/mailman/listinfo/gnucash-devel > _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
