Re: bypassing finance::quote

2014-10-06 Thread Derek Atkins
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  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  wrote:
>> Hi,
>>
>> Rafael Lima  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
>>warl...@mit.eduPGP 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
   warl...@mit.eduPGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: New GnuCash Release, 2.6.4

2014-10-06 Thread Benno Schulenberg

Hello John,

> [...] Maybe Valdis will remember whether Rihards even asked to take his
> translation and move it into the TP, but this certainly doesn’t fall
> into the category of “usually come through the TP”. Yes, it should be
> marked external.

Okay, done.  Thanks for the explanation.

One other thing.  The PO file for Farsi (fa.po) has a much more recent
revision date at the TP than in the 2.6.4 tarball.  Could you pull the
one from the TP into your version control system?  Or am I overlooking
something?

Regards,

Benno
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: New GnuCash Release, 2.6.4

2014-10-06 Thread John Ralls

On Oct 6, 2014, at 10:55 AM, Benno Schulenberg 
 wrote:

> 
> Hello John,
> 
>> [...] Maybe Valdis will remember whether Rihards even asked to take his
>> translation and move it into the TP, but this certainly doesn’t fall
>> into the category of “usually come through the TP”. Yes, it should be
>> marked external.
> 
> Okay, done.  Thanks for the explanation.
> 
> One other thing.  The PO file for Farsi (fa.po) has a much more recent
> revision date at the TP than in the 2.6.4 tarball.  Could you pull the
> one from the TP into your version control system?  Or am I overlooking
> something?

Benno,

The thread concerning the Farsi translation begins at 
http://lists.gnucash.org/pipermail/gnucash-devel/2013-August/036007.html and 
continues at 
http://lists.gnucash.org/pipermail/gnucash-devel/2013-August/036021.html

Executive summary: There were unresolved issues with the TP translation so we 
reverted the commit.

It looks from the file that’s on TP that the two translators did get together, 
because it’s newer and has several of the strings that Mehdi Alidoost reported 
missing in the August version, so I’ll take it that they did resolve it and 
no-one here noticed.

I’ll pull that in now.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel