photo-stats

Unnamed repository; edit this file 'description' to name the repository.
git clone git://code.clttr.info/photo-stats.git
Log | Files | Refs | README | LICENSE

commit d40c0f148c492361dc8dc8371e1f9d3df678e04a
parent bab8a6a7c7a491395dca0089cab3a1df2d5cdc4c
Author: René Wagner <rwagner@rw-net.de>
Date:   Sat, 15 Aug 2020 12:12:35 +0200

add grouping by hour

Diffstat:
Mphosta.pl | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/phosta.pl b/phosta.pl @@ -54,7 +54,7 @@ exit 0; sub validate { - my @group_params = ('year', 'month', 'week', ''); + my @group_params = ('year', 'month', 'week', 'hour', ''); if ( ! ($opt_g ~~ @group_params) ) { return 0; } my @select_params = ('maker', 'model', 'lens', 'aperture', 'exposuretime', 'iso', 'focallength', 'focallength35mm', ''); @@ -149,6 +149,11 @@ sub get_sql $fieldlist = "strftime('%Y', datetimeoriginal) as year,"; $grouplist = "strftime('%Y', datetimeoriginal)"; } + when ('hour') + { + $fieldlist = "strftime('%H', datetimeoriginal) as hour,"; + $grouplist = "strftime('%H', datetimeoriginal)"; + } } if ($selected ne '') @@ -245,9 +250,9 @@ sub main::HELP_MESSAGE say ' Media files in the given folder and every subfolder are scanned, EXIF data extracted and pulled into the database'; say ''; say 'stats querying:'; - say ' -g : (query mode) group by time range, defaults to total (which means no grouping by time range)'; - say ' allowed values: year, month, week'; - say ' -s : (query mode) specify the information you want to select, defaults to none (just show number of images)'; + say ' -g : group by time range, defaults to total (which means no grouping by time range)'; + say ' allowed values: year, month, week, hour'; + say ' -s : specify the information you want to select, defaults to none (just show number of images)'; say ' allowed values: maker, model, lens, aperture, exposuretime, iso, focallength, focallength35mm'; say ' multiple fields should be listed comma-separated'; say ' -t <range> : only take images into account which have been taken in the given timerange';