bypassing finance::quote

Dmitry Pavlov zeldigas at gmail.com
Wed Oct 8 12:08:31 EDT 2014


So I think the problem is that gnucash is only works with finance::quote
and there is no something like java interfaces so that you can write
different impl  and replace finance quote with that.

2014-10-08 8:56 GMT-07:00 Rafael Lima <ragpl07 at gmail.com>:

> Hi Dmitry,
>
> This is why I actually do, but to me it doesnt is a good way, I mean I
> need a whole perl infrastructure just to call a java program.
>
> And indeed im in that situation not because i "dont want" is more
> because "im not able to" =b.. i never liked these script languages as
> python perl etc, so as i have some sources and i need to maintain a
> code to retrieve that information in many unstandartized sites i
> thought that to maintain it would be easier to me in java.
>
> I'm sorry for ask it here, i know that this question is kind of
> "selfish" isn't rainsing the comunity at all but i couldn't go so far
> by myselft.
>
> My main goal is to complete remove perl and keep online quote working
>
> On Wed, Oct 8, 2014 at 3:01 AM, Dmitry Pavlov <zeldigas at gmail.com> wrote:
> > If you do not want to include your parsing code to finance code library,
> > then the best way would be just make a minimalistic perl module that
> calls
> > you java program. Then you wont spend time to reimplementing this
> > gnucash+F::Q stuff and just make you things done :)
> >
> > Here is a good description of to call any internal program:
> > http://perlmeme.org/faqs/system/system.html
> >
> > 2014-10-06 8:53 GMT-07:00 Derek Atkins <warlord at mit.edu>:
> >>
> >> Hi,
> >>
> >> Please remember to CC gnucash-devel on all responses using your mailer's
> >> reply-to-list or reply-all functionality.  When you reply to me
> >> personally you can get stuck in my personal mail-processing delays and
> >> you don't benefit from all the expertice on the list.
> >>
> >> Having said that.....
> >>
> >> Rafael Lima <ragpl07 at gmail.com> writes:
> >>
> >> > Is there any reason you didn't implement it as a PERL module behind
> >> > F::Q?  Then it would *just work*.
> >> > R- I didn't find an easy to get source for these quotes, so i needed
> >> > to call a quote website (as bloomberg) and interprect the html, I
> >> > spend a lot of time trying to do it in perl cuz im not used with it,
> >> > so i just realized that i was wasting time and could do it in java in
> >> > 5 minutes.
> >>
> >> I'm not sure what your definition of "easy way" is..  Most of F::Q is a
> >> bunch of screen scrapers.  So doing it in perl v java is just a matter
> >> of language.
> >>
> >> > "You would need to duplicate this functionality to convince GnuCash
> that
> >> > F::Q exists"
> >> >
> >> > R-do you mean re-write the code? i just would like to know what
> >> > structure is gnc looking for, so i could pretend have this structure
> >>
> >> No, I mean re-implement the gnucash<->F::Q interfaces.  For example, you
> >> would need to replace gnc-fq-helper with a wrapper around your java
> >> application and have the input/output work "the same" so gnucash
> >> *thinks* it's still talking to F::Q.
> >>
> >> -derek
> >>
> >> > On Fri, Oct 3, 2014 at 12:40 PM, Derek Atkins <warlord at mit.edu>
> wrote:
> >> >> Hi,
> >> >>
> >> >> Rafael Lima <ragpl07 at gmail.com> writes:
> >> >>
> >> >> [snip]
> >> >>> So, i develop a java program to do it, create a new source quote
> >> >>> module that just call my java code and put it on the library and
> >> >>> everything works fine.
> >> >>
> >> >> Is there any reason you didn't implement it as a PERL module behind
> >> >> F::Q?  Then it would *just work*.
> >> >>
> >> >>> But i hate this situation, i've installed a perl interpreter just
> for
> >> >>> use this library what doesn't have any function to my [is just a
> link]
> >> >>>
> >> >>>
> >> >>> So i looked the code, looking for a hook for try insert my java
> code,
> >> >>> but how im new at this code and not so expert cpp develop i would
> like
> >> >>> some help:
> >> >>>
> >> >>> 1- i found the place where is called the function to check if
> >> >>> finance::quote is installed... but i couldn't understand how it
> works
> >> >>> LINE 19071 of swig-engine.c [pasted here
> >> >>> http://paste.ofcode.org/38qxqQvM6aGFD3vxaQ2ekHK]
> >> >>>
> >> >>> seams that he is looking for something in a directory but what is
> >> >>> exactally? i tried to reproduce the finance::quote directory
> >> >>> estructure in my system and didn't work [maybe i forgot some file]
> >> >>
> >> >> You would need to duplicate this functionality to convince GnuCash
> that
> >> >> F::Q exists.
> >> >>
> >> >>> 2-i found where the finance::quote code is called but i didn't
> >> >>> understand the use of scm objects,
> >> >>> LINE 290 of dialog-price-edit-db.c
> >> >>> http://paste.ofcode.org/vwcWBUmDVMqM9VWdUdi5JE
> >> >>>
> >> >>> I realize that is a system call and hopefully there are some
> >> >>> enviroiment  variables envolved [so i could change its value and
> call
> >> >>> my own code =D] but i cant deep understand the code, can anyone help
> >> >>> me?
> >> >>
> >> >> You will need to replicate the F::Q interface to GnuCash (see
> >> >> gnc-fq-helper) and have that call into your program instead of F::Q.
> >> >>
> >> >>> sorry if i did something inconvenient and for my bad english...
> >> >>>
> >> >>>
> >> >>> thanks for your attention
> >> >>>
> >> >>> I'm using gnucash 2.6.4 on a windows 7
> >> >>
> >> >> -derek
> >> >>
> >> >> --
> >> >>        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
> >> >>        Member, MIT Student Information Processing Board  (SIPB)
> >> >>        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
> >> >>        warlord at MIT.EDU                        PGP key available
> >>
> >> --
> >>        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
> >>        Member, MIT Student Information Processing Board  (SIPB)
> >>        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
> >>        warlord at MIT.EDU                        PGP key available
> >> _______________________________________________
> >> gnucash-devel mailing list
> >> gnucash-devel at gnucash.org
> >> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> >
> >
> >
> >
> > --
> > С уважением,
> > Дмитрий Павлов
>
>
>
> --
> --
> Rafael Lima
>
> _______________________________________________
> 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