CC: | bug-Finance-Quote [...] rt.cpan.org, gnucash-user [...] gnucash.org |
Subject: | Re: Finance::Quote IndiaMutual - source changes |
Date: | Sun, 20 May 2012 17:07:47 -0700 |
To: | Divakar Ramachandran <divakar07 [...] dataone.in> |
From: | John Ralls <jralls [...] ceridwen.us> |
On May 20, 2012, at 12:14 PM, Divakar Ramachandran wrote:
Show quoted text
> There are two changes at the AMFI <javascript:parent.test_func(0)> India website <javascript:parent.test_func(1)> which makes IndiaMutual <javascript:parent.test_func(2)>.pm <javascript:parent.test_func(3)> non-functional.
>
> 1. URL <javascript:parent.test_func(4)> for quote source on AMFI <javascript:parent.test_func(5)> India has changed to: http://www.amfiindia.com/spages/NAV0.txt
>
> Replace lines 22 - 24:
>
> $AMFI <javascript:parent.test_func(6)>_MAIN_URL <javascript:parent.test_func(7)> = ("http://amfiindia.com/");
> $AMFI <javascript:parent.test_func(8)>_URL <javascript:parent.test_func(9)> =("${AMFI <javascript:parent.test_func(10)>_MAIN_URL <javascript:parent.test_func(11)>}NavReport <javascript:parent.test_func(12)>.aspx <javascript:parent.test_func(13)>?type=0");
> #$AMFI <javascript:parent.test_func(14)>_URL <javascript:parent.test_func(15)> =("${AMFI <javascript:parent.test_func(16)>_MAIN_URL <javascript:parent.test_func(17)>}spages <javascript:parent.test_func(18)>/NAV <javascript:parent.test_func(19)>0.txt <javascript:parent.test_func(20)>"); This page seems to do the job also. Keep for reference
>
> with:
>
> $AMFI <javascript:parent.test_func(21)>_MAIN_URL <javascript:parent.test_func(22)> = ("http://www.amfiindia.com/");
> #$AMFI <javascript:parent.test_func(23)>_URL <javascript:parent.test_func(24)> = ("${AMFI <javascript:parent.test_func(25)>_MAIN_URL <javascript:parent.test_func(26)>}NavReport <javascript:parent.test_func(27)>.aspx <javascript:parent.test_func(28)>?type=0");
> $AMFI <javascript:parent.test_func(29)>_URL <javascript:parent.test_func(30)> = ("${AMFI <javascript:parent.test_func(31)>_MAIN_URL <javascript:parent.test_func(32)>}spages <javascript:parent.test_func(33)>/NAV <javascript:parent.test_func(34)>0.txt <javascript:parent.test_func(35)>"); #This page seems to do the job also. Keep for reference
>
>
> 2. Within the file, for every fund, ISIN <javascript:parent.test_func(36)> codes appear for growth and reinvestment <javascript:parent.test_func(37)> versions of the funds just after the fund code, which is the first item on the line.
>
> This requires lines 89 - 94:
>
> $fundquote <javascript:parent.test_func(38)>{$symbol, "name"} = $data->[0];
> $fundquote <javascript:parent.test_func(39)>{$symbol, "nav <javascript:parent.test_func(40)>"} = $data->[1];
> $fundquote <javascript:parent.test_func(41)>{$symbol, "rprice <javascript:parent.test_func(42)>"} = $data->[2];
> $fundquote <javascript:parent.test_func(43)>{$symbol, "sprice <javascript:parent.test_func(44)>"} = $data->[3];
> $quoter <javascript:parent.test_func(45)>->store_date(\%fundquote <javascript:parent.test_func(46)>, $symbol, {eurodate <javascript:parent.test_func(47)> => $data->[4]});
> $fundquote <javascript:parent.test_func(48)>{$symbol, "success"} = 1;
>
> to be replaced with:
>
> $fundquote <javascript:parent.test_func(49)>{$symbol, "name"} = $data->[4];
> $fundquote <javascript:parent.test_func(50)>{$symbol, "nav <javascript:parent.test_func(51)>"} = $data->[5];
> $fundquote <javascript:parent.test_func(52)>{$symbol, "rprice <javascript:parent.test_func(53)>"} = $data->[6];
> $fundquote <javascript:parent.test_func(54)>{$symbol, "sprice <javascript:parent.test_func(55)>"} = $data->[7];
> $quoter <javascript:parent.test_func(56)>->store_date(\%fundquote <javascript:parent.test_func(57)>, $symbol, {eurodate <javascript:parent.test_func(58)> => $data->[8]});
> $fundquote <javascript:parent.test_func(59)>{$symbol, "success"} = 1;
>
> This works for me on Ubuntu <javascript:parent.test_func(60)> 10.04 LTS <javascript:parent.test_func(61)> 64-bit with GnuCash <javascript:parent.test_func(62)> 2.2.9 and Perl <javascript:parent.test_func(63)> v5.10.1 built for x86_64-linux <javascript:parent.test_func(64)>-gnu-thread-multi.
>
Divakar,
Thanks for sharing that. Are the <javascript:parent.test_func> tags part of the code or just an artifact from your mail client?
Regards,
John Ralls