photo-stats

Unnamed repository; edit this file 'description' to name the repository.
git clone git://code.clttr.info/photo-stats.git
Log | Files | Refs | README | LICENSE

commit 37e472fc3a5e80a3b98742e51e50ce33ac505a74
parent 4ae7bef994bf4bab7e5668948e6449b89fba914c
Author: René Wagner <rwagner@rw-net.de>
Date:   Sat, 12 Sep 2020 19:06:56 +0200

introduce graph display when only 1 field is selected

Diffstat:
Mphosta.pl | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/phosta.pl b/phosta.pl @@ -17,7 +17,7 @@ use File::HomeDir; $Getopt::Std::STANDARD_HELP_VERSION = 'true'; -my $VERSION = '1.0'; +my $VERSION = '1.1'; my $PROGRAM = 'Photo Stats'; my $configfile = catfile(File::HomeDir->my_home, '.phosta.conf'); @@ -376,12 +376,16 @@ sub print_filterinfo say ''; } -sub result_to_table +sub result_to_graph { my ( $headers, $rows, $sum ) = @_; - + foreach (@$rows) + { + say sprintf("%20s | %-50s | %5s (%s)", @$_[0], "*"x(50/$sum*@$_[1]), @$_[2], @$_[1]); + } } + sub result_to_table { my ( $headers, $rows, $sum, $skippedlines ) = @_;