commit 1956e53b0da72d5287689b4cb284fcf5731f1fdb
parent 93c4f6ac4b5501a8564e563095c3a72a3d410fb2
Author: René Wagner <rwagner@rw-net.de>
Date: Sat, 15 Aug 2020 16:48:19 +0200
improve formatting of focallength
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1 +1,2 @@
-photo_stats.db
+*.db
+*.sqlite
diff --git a/phosta.pl b/phosta.pl
@@ -101,7 +101,7 @@ sub populate_db
{
my ($destination_dir) = @_;
- say "Scanning $destination_dir for images...";
+ say "Scanning $destination_dir for images...this may take a while...";
my $extensions = ' -ext ' . join(' -ext ', split(/\,/, $opt_E)) .' ';
@@ -125,6 +125,8 @@ sub populate_db
$lens = ($lens ~~ @forbidden_content) ? $lensmodel : $lens;
if ( $lens ~~ @forbidden_content) { $lens = '-'; }
$apert = ($apert ne '-') ? sprintf("%.1f", $apert) : $apert;
+ $fl = ($fl ne '-') ? sprintf("%.1f", $fl) : $fl;
+ $fl35 = ($fl35 ne '-') ? POSIX::lround($fl35) : $fl35;
$exposuretime = (looks_like_number($exposuretime) && $exposuretime < 1) ? "1/". POSIX::lround(1/$exposuretime) : $exposuretime;
if ($datetimeoriginal eq '0000:00:00 00:00:00') { $datetimeoriginal = '-'; }