Browse Source

improve formatting of focallength

pull/9/head 20200815
René Wagner 1 year ago
parent
commit
1956e53b0d
  1. 3
      .gitignore
  2. 4
      phosta.pl

3
.gitignore

@ -1 +1,2 @@
photo_stats.db
*.db
*.sqlite

4
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 = '-'; }

Loading…
Cancel
Save