chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix buyer/seller who were swapped in --arbitrage output
[ypp-sc-tools.db-live.git]
/
yarrg
/
commod-results-processor
diff --git
a/yarrg/commod-results-processor
b/yarrg/commod-results-processor
index e53bbb58c1351283043d6371abfc4bc0589fe9d5..d322c1c7b682638d14c861b573386e97d81cc279 100755
(executable)
--- a/
yarrg/commod-results-processor
+++ b/
yarrg/commod-results-processor
@@
-129,16
+129,18
@@
sub main__arbitrage () {
$info.=
sprintf("%-13.13s| %-19.19s %4d| %-19.19s %4d|%3d x%3d =%3d\n",
$commod,
$info.=
sprintf("%-13.13s| %-19.19s %4d| %-19.19s %4d|%3d x%3d =%3d\n",
$commod,
- $buys[0]{Stall},$buys[0]{Price},
$sells[0]{Stall},$sells[0]{Price},
$sells[0]{Stall},$sells[0]{Price},
+ $buys[0]{Stall},$buys[0]{Price},
$qty, $pricediff, $tprofit);
sub arb_subtract_qty (\@) {
my ($verbs) = @_;
my $verb= shift @$verbs;
$qty, $pricediff, $tprofit);
sub arb_subtract_qty (\@) {
my ($verbs) = @_;
my $verb= shift @$verbs;
+ my $vqty= $verb->{Qty};
+ $vqty =~ s/^\>//;
unshift @$verbs, {
Stall => $verb->{Stall},
Price => $verb->{Price},
unshift @$verbs, {
Stall => $verb->{Stall},
Price => $verb->{Price},
- Qty => $v
erb->{Qty}
- $qty
+ Qty => $v
qty
- $qty
};
}
arb_subtract_qty(@buys);
};
}
arb_subtract_qty(@buys);
@@
-447,6
+449,8
@@
sub main__uploadyarrg () {
my $respcontent= yarrgpostform($ua, \%o);
$respcontent =~ m/^OK\b/ or die "$respcontent ?";
my $respcontent= yarrgpostform($ua, \%o);
$respcontent =~ m/^OK\b/ or die "$respcontent ?";
+ $respcontent =~ s/^/ /mg;
+ print $respcontent,"\n";
}
sub main__uploadpctb () {
}
sub main__uploadpctb () {