Import prices API
nospamforas
nospamforas at gmx.net
Sat Apr 7 10:39:41 EDT 2007
Am Samstag, 7. April 2007 15:35 schrieben Sie:
> GnuCash calls the gnc-fq-helper application to get quotes.
Do I only need to deal with gnc-fq-helper? There are other programs gnc-fq-*.
I know that gnucash checks whether Finance::Quote is installed. Well it isn't
and it won't be (see below).
It would help to know, from where gnu-fq-helper is called.
> You could
> replace that program with any other program you want to return quotes
> back to Gnucash. Run the program by hand if you want to see the
> format of the returned data.
>
Since Finance::Quote isn't installed, I can't do this -- unfortunately. Even
if it were installed, it would be of no use (see below). To know, how it is
called would help (see above).
> I dont know if it expects to get one quote at a time or gets all quotes
> in one run.
>
> There's also the scheme API (and I API) you could use if you wanted to
> write code to install quotes.
Could you tell me a little bit more? Are you talking about price-quotes.scm?
>
> Also, F::Q itself has an API; it's a plugin architecture so you could plug
> in your own module.
>
> But I have to ask: why would you want to NOT use F::Q?
>
It is of no use to me, for the following reasons:
(a) All modules do not fit. I would have to write my own one. I checked that
thoroughly and repeatedly.
(b) I don't know perl, and I don't want to dig into it. Time is one issue.
(c) I already wrote my own module a couple of years ago. It was enough then to
copy an existing module and change it a little bit. It only took one or two
days.
(d) Now I would have to write another module. This time it is much more
complicated and I estimate that I would have to spend a lot of time to learn
enough of perl to do it. -- Too much time.
(e) These modules have to be maintained once in a while. It would be even more
inefficient for me to always relearn perl just for that matter.
Well, I could write a module to read quotes from a file and write my own
program to get those quotes beforehand and write them to a file to be picked
up by the module. But I don't like this approach. I would have to install not
only Finance::Quote but also the modules it needs just to be able to read
quotes from a file. The whole stuff would just need to be present....
It will be much more elegant to directly plug in my own program. And if the
gnucash community would define and freeze an interface, I guess it would help
other people as well. But don't get me wrong: you don't need to do this just
for me.
Thanks for any help.
- AS
More information about the gnucash-devel
mailing list