Add support for printing currency quotes.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11965 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2005-11-17 05:48:38 +00:00
parent 0b8a944f30
commit 0046dfc6bd
2 changed files with 18 additions and 6 deletions

View File

@ -1,5 +1,8 @@
2005-11-17 David Hampton <hampton@employees.org> 2005-11-17 David Hampton <hampton@employees.org>
* src/quotes/dump-finance-quote: Add support for printing currency
quotes.
* most files: Update FSF street address. * most files: Update FSF street address.
2005-11-16 David Hampton <hampton@employees.org> 2005-11-16 David Hampton <hampton@employees.org>

View File

@ -160,12 +160,21 @@ if (@ARGV[0] eq "-v") {
} }
my $exchange = shift; my $exchange = shift;
while ($#ARGV >= 0) { if ($exchange eq "currency") {
my $stock = shift; my $from = shift;
my %quotes = $q->fetch($exchange, $stock); while ($#ARGV >= 0) {
report($stock, \%quotes, $verbose); my $to = shift;
if ($#ARGV >= 0) { my $result = $q->currency($from, $to);
printf "=====\n\n"; printf "1 $from = $result $to\n";
}
} else {
while ($#ARGV >= 0) {
my $stock = shift;
my %quotes = $q->fetch($exchange, $stock);
report($stock, \%quotes, $verbose);
if ($#ARGV >= 0) {
printf "=====\n\n";
}
} }
} }