New Canadian source for price quotes

James A. Treacy treacy@debian.org
Fri, 29 Jun 2001 01:07:20 -0400


On Thu, Jun 28, 2001 at 07:42:58PM -0500, Linas Vepstas wrote:
> On Thu, Jun 21, 2001 at 03:25:40PM -0400, James A. Treacy was heard to remark:
> > I was unable to find any of the TD Waterhouse managed funds using the
> > existing sources, so I have created a new one for inclusion in
> > gnucash. It looks like the files
> > 	src/gnc-ui-util.c src/gnc-ui-util.h
> > 	src/quotes/finance-quote-helper.in src/scm/price-quotes.scm:
> > also need to be modified.
> 
> Well, we got this into finance::quote, any luck with the other mods?
> 
Are you refering to the mods needed for gnucash to recognize this new
source? If you want, I can send in a patch which will enable this source,
as well as the other new ones implemented in the latest version of
finance::quote. What I'd prefer to see is for gnucash to grab the list
of sources from finance::quote at runtime.

The maintainer of finance::quote added a method to the latest version
which returns a list of all the quote sources. This could be used
to generate the list of quote source in gnucash at runtime. Since
only the short names of the sources is returned, the full name of
the source would not be available. It would be better if
finance::quote returned a hash of with the keys pointing to the full
name of the source.

I may not have explained that well, but an example should make it
clear. The method could return a hash like the following:
('troweprice' =>  'T. Rowe Price',
 'fidelity'   =>  'Fidelity Investments',
)

I haven't put much time into this so still am not positive this is all
that is needed from finance::quote to implement this. Do you feel
this would be a useful change? One potential trouble spot is what to
do if a quote source disappears from finance::quote. This is something
that could also be a problem with the current setup.

I would be willing to take a stab at this, but don't expect fast
results as I'll be travelling a lot this summer. I'm already
neglecting my duties as Debian webmaster.

-- 
James (Jay) Treacy
treacy@debian.org