diff --git a/README.md b/README.md

index 3ac16b366ca1c10efa1d569e2b7d62ec5e593bb4..830f7abc6e853c88483ad6814ceb20bac5fa5c1e 100644

--- a/README.md

+++ b/README.md

@@ -35,3 +35,7 @@ The stats are available as grouped counts by

- all time total

- by year

- by month

+

+## FAQ

+- I have my images on a network share, how can i include them into the stats?

+You should mount the share and use is like a local directory?

diff --git a/phosta.pl b/phosta.pl

index b6c49bc779e5bf2c37db1bb092ba5f31e4d83bb1..ea57534ede6af6292d28020e2b96fd4e5cf2327b 100755

--- a/phosta.pl

+++ b/phosta.pl

@@ -23,17 +23,18 @@ my $password = "";

$Getopt::Std::STANDARD_HELP_VERSION = 'true';

-my $VERSION = '0.1';

+my $VERSION = '0.2';

my $PROGRAM = 'Photo Stats';

my $configfile = catfile(File::HomeDir->my_home, '.photo-stats.conf');

# read commandline switches

our $opt_p='';

+our $opt_c=0;

getconfig($configfile);

-getopts('p:') or die "Invalid parameters provided! See 'phosta.pl --help' for more details.";

+getopts('cp:') or die "Invalid parameters provided! See 'phosta.pl --help' for more details.";

#if ( $opt_s ) { writeconfig($configfile); }

if ( $opt_p ne '' ) {

@@ -53,7 +54,7 @@ my @lines = qx($cmd);

my $dbh = DBI->connect($dsn, $userid, $password, { RaiseError => 1 })

or die $DBI::errstr;

- $dbh->do('DELETE FROM photos');

+ if ( $opt_c ) { $dbh->do('DELETE FROM photos'); }

my $errorcount = 0;

my $emptycount = 0;

foreach (@lines)

@@ -67,8 +68,8 @@ $apert = ($apert ne '-') ? sprintf("%.1f", $apert) : $apert;

$exposuretime = (looks_like_number($exposuretime) && $exposuretime < 1) ? "1/". POSIX::lround(1/$exposuretime) : $exposuretime;

if ($datetimeoriginal eq '0000:00:00 00:00:00') { $datetimeoriginal = '-'; }

- my $stmt = "INSERT INTO photos (file, maker, model, lens, focallength, focallength35mm, aperture, exposuretime, iso, flash, datetimeoriginal)

- VALUES ('$file', '$maker', '$model', '$lens', '$fl', '$fl35', '$apert', '$exposuretime', '$iso', '$flash', '$datetimeoriginal')";

+ my $stmt = "INSERT OR REPLACE INTO photos (file, maker, model, lens, focallength, focallength35mm, aperture, exposuretime, iso, flash, datetimeoriginal)

+ VALUES ('$file', '$maker', '$model', '$lens', '$fl', '$fl35', '$apert', '$exposuretime', '$iso', '$flash', '$datetimeoriginal')";

my $rv = $dbh->do($stmt) or $errorcount++;

}

$dbh->disconnect();

@@ -95,7 +96,7 @@ {

say $PROGRAM . ' - version ' . $VERSION;

say 'published under BSD 3 - Clause License';

say 'Copyright(c) 2019-2020 René Wagner';

- say 'https://git.sr.ht/~rwa/photo-helpers';

+ say 'https://git.sr.ht/~rwa/photo-stats';

}

sub main::HELP_MESSAGE

@@ -106,7 +107,7 @@ say '';

say 'usage: phosta(.pl) [options]';

say '';

say 'options:';

- say ' -p <source folder> : populate database from the files in the specified folder';

- say ' -s : safe current options (-r, -f, -c only) to user profile. If present the saved values are applied automatically.';

- say ' --help : show this help';

+ say ' -p <folder> : populate database from the files in the specified folder';

+ say ' -c : clear the database before populating with data from the folder';

+ say ' --help : show this help';

}

diff --git a/photo_stats.db b/photo_stats.db

index 1b5768e54d08caf0575d544d1e8c09cc4fd7f660..aee8f82afb96fb5f2947664bcb27c35c0c8452c6 100644

Binary files a/photo_stats.db and b/photo_stats.db differ