photo-stats

statistics processor for the terminal
git clone https://git.clttr.info/photo-stats.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit d68acebdae56856d47048ec0330104bdb7a267d6
parent c30f19f8ffe68d8de5bb25cd2665c47111834896
Author: René Wagner <rwagner@rw-net.de>
Date:   Tue, 28 Jul 2020 21:03:43 +0200

implement exiftool

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

diff --git a/phosta.pl b/phosta.pl @@ -8,8 +8,7 @@ use strict; use feature qw(say); use Cwd; use File::Basename; -use File::Copy; -use File::Find; +use File::Spec::Functions; use File::HomeDir; use Getopt::Std; @@ -37,10 +36,25 @@ foreach my $arg ( @ARGV ) if ( $opt_s ) { writeconfig($configfile); } -#move_files($destination_dir); +get_stats($destination_dir); exit 0; +sub get_stats +{ + my ($destination_dir) = @_; + + say "Scanning $destination_dir for files..."; + + my $cmd = "exiftool -r -m -f -p '\$filepath##\$make##\$model##\$lens##\$lensmodel##\$focallength##\$focallengthin35mmformat##\$aperture##\$shutterspeed##\$iso##\$flash##\$datetimeoriginal\"' -d \"%Y-%m-%d %H:%M:%S\" -ext jpg " . $destination_dir; + my @lines = qx($cmd); + + foreach (@lines) + { + say "$_"; + } +} + sub getconfig { my ( $config_filename ) = @_;