commit 1be87c2edfd66a393d311e5ca2ad392d337276ff
parent 69885a95f4c672904e20fe6e5b908125702d9165
Author: René Wagner <rwagner@rw-net.de>
Date: Fri, 28 Aug 2020 20:29:40 +0200
reformat output for timerange filters
Diffstat:
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
@@ -6,7 +6,7 @@ This project is a small statistic generator for the terminal which accumulates a
It is mainly a selfcontained [SQlite](https://sqlite.org) database that stores the data which is extracted from the exif data of your images using [exiftool](https://exiftool.org/) and provides some methods to query the gathered data and gain some statistical insight.
-**Additional information can be found on the [wiki page](https://man.sr.ht/~rwa/photo-workflow/photo-stats).**
+**Additional information can be found on the [wiki page](https://man.sr.ht/~rwa/photo-workflow/photo-stats.md).**
## requirements
The famous `exiftool` needs to be installed on your system, no matter if you use prebuilt binarys or the bare scripts.
@@ -21,7 +21,7 @@ To run the script, open a shell and invoke `perl phosta.pl`, on most systems it
#### prerequisites for running the pure scripts
-- Perl 5.32 (or newer)
+- Perl 5.30 (or newer)
Additionally the following perl modules need to be installed:
diff --git a/phosta.pl b/phosta.pl
@@ -287,24 +287,25 @@ sub result_to_stdout
}
}
- if (defined($opt_n))
- {
- say 'Showing '. color('bold'). "top $currentlines". color('reset'). ' results, skipping '. color('italic') . "$skippedlines lines".color('reset') .'.';
- say 'A total of '. color('bold'). "$sum images". color('reset') .' matched your criteria.';
- say '';
- }
-
if (defined($opt_f) || defined($opt_t))
{
- say 'results consider the following filters';
+ say 'Applied filters:';
if ($opt_t)
{
my ($from, $to) = get_timerange();
- !defined($from) or say ' - images taken since '. color('bold'). $from . color('reset');
- !defined($to) or say ' - images taken till '. color('bold'). $to . color('reset');
+ if (defined($from) && defined($to)) { say ' - images taken between '. color('bold'). $from .color('reset') .' and '. color('bold'). $to . color('reset'); }
+ if (defined($from) && !defined($to)) { say ' - images taken since '. color('bold'). $from . color('reset'); }
+ if (defined($to) && !defined($from)) { say ' - images taken till '. color('bold'). $to . color('reset'); }
}
say '';
}
+
+ if (defined($opt_n))
+ {
+ say 'Showing '. color('bold'). "top $currentlines". color('reset'). ' results, skipping '. color('italic') . "$skippedlines lines".color('reset') .'.';
+ }
+ say 'A total of '. color('bold'). "$sum images". color('reset') .' matched your criteria.';
+ say '';
say $tb->draw;
}