pricecharts

track prices of consumer electronics
Log | Files | Refs | README

commit 7b17ed980bd09375bb3aa5133818ec31d7382ee6
parent 3e3ba8cecde15a22dbd17d4d32dda561366bd46d
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Thu, 19 Mar 2015 01:49:21 -0600

gen_svg: forgot about verbosity

Diffstat:
Mgen_svg | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gen_svg b/gen_svg @@ -44,11 +44,11 @@ $sql = "select manufacturer, part_num, description from products"; my $parts_sth = $dbh->prepare($sql); $parts_sth->execute(); -print "info: generating svg's "; +print "info: generating svg's " if ($args{v}); my ($raw_total, $rendered_total, $points, $series) = (0, 0, 0, 0); while (my ($brand, $part_num, $description) = $parts_sth->fetchrow_array()) { $raw_total++; - spin(); + spin() if ($args{v}); # make sure we have at least one price to work with $sql = "select min(date), max(date), min(price), max(price) " . @@ -170,9 +170,12 @@ while (my ($brand, $part_num, $description) = $parts_sth->fetchrow_array()) { $rendered_total++; } -print "\n"; -printf "info: %i svg's rendered (%i skipped), %i series (%i points)\n", - $rendered_total, $raw_total - $rendered_total, $series, $points; + +if ($args{v}) { + print "\n"; + printf "info: %i svg's rendered (%i skipped), %i series (%i points)\n", + $rendered_total, $raw_total - $rendered_total, $series, $points; +} $dbh->disconnect();