getting online quotes
David Overton
doverton@bigpond.net.au
Mon, 21 Jan 2002 20:33:23 +1100
--X1bOJ3K7DJ5YkBrT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Mon, Jan 21, 2002 at 08:12:04PM +1100, Dave Compton wrote:
> Hi all,
>
> I've been using gnucash 1.6.2 for about a month, and I really like it.
> The only problem I'm having is I can't seem to get stock quotes online.
> I tried with the "price editor' from the menu, and I get the message
>
> "You are missing sime needed Perl libraries. Run 'update-finance-quote'
> as root to install them."
>
> I did this (but obviously not correctly), and i can't work out how to
> fix it.
>
> Can anyone provide me with some help (I am trying to get quotes from
> the ASX).
Hi,
Can you give any more detail about what the problem is? It might be a
bit hard for people to help you if you don't at least tell us what is
going wrong, e.g. what error message you are getting.
I have found that to get ASX quotes working with GnuCash I needed to
modify finance-quote-helper which is in /usr/share/gnucash on my system.
I have included a patch which you can try if you like.
GnuCash maintainers: any chance of including this patch in the official
distribution? I haven't tested whether it works with other quote
sources though.
David
--X1bOJ3K7DJ5YkBrT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="finance-quote-helper.patch"
--- finance-quote-helper Tue Dec 18 23:18:36 2001
+++ finance-quote-helper.orig Mon Nov 26 20:54:46 2001
@@ -223,11 +223,7 @@
}
$field = 'symbol';
- if (exists($$quotehash{$itemname, $field})) {
- $data = schemify_string($$quotehash{$itemname, $field});
- } else {
- $data = schemify_string($itemname);
- }
+ $data = schemify_string($$quotehash{$itemname, $field});
$quotedata .= "($field . $data)";
$field = 'gnc:time-no-zone';
@@ -283,7 +279,7 @@
# Make sure we have an opening ( preceeded only by whitespace.
# and followed by a one word method name composed of [a-z_]+.
# Kill off the whitespace if we do and grab the command.
- if($input !~ s/^\s*\(\s*$dq?([a-z_]+)$dq?\s+//o) { return 0; }
+ if($input !~ s/^\s*\(\s*([a-z_]+)\s+//o) { return 0; }
my $quote_method_name = $1;
--X1bOJ3K7DJ5YkBrT--