Commodities initialization list

Herbert Thoma herbert.thoma at iis.fraunhofer.de
Tue Aug 11 10:12:45 EDT 2015


Am 11.08.2015 um 15:25 schrieb Phil Longstaff:
> 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.

I just double checked and indeed I found no way to add a new commodity source
in the GUI.

However, I remember that I did this in an older version of GnuCash. I have the
commodity sources XETRA and LSE in my data file and I am sure that I entered
them with the commodity editor dialog some years ago. And they still work well.
(They are only an internal grouping feature in GnuCash anyway and don't have
any other function, as far as I can tell.)

So this seems to be a regression.

  Herbert.

> Phil
>
> On Tue, Aug 11, 2015 at 4:01 AM, John Ralls <jralls at ceridwen.us> wrote:
>
>>> On Aug 11, 2015, at 8:27 AM, Geert Janssens <geert.gnucash at kobaltwit.be>
>> wrote:
>>> On Monday 10 August 2015 16:29:25 John Ralls wrote:
>>>>> On Aug 10, 2015, at 3:16 PM, Ngewi Fet <ngewif at gmail.com> 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
>> gnucash-devel at gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>>
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


More information about the gnucash-devel mailing list