major update to README.md and help output minor refactoring
|12 months ago|
|.build.yml||12 months ago|
|.gitignore||12 months ago|
|LICENSE||1 year ago|
|PKGBUILD||1 year ago|
|README.md||12 months ago|
|phosta.pl||12 months ago|
This project is about a small tool providing some stats of your photography.
It is mainly a selfcontained SQlite database that stores the data which is extracted from the exif data of your images using exiftool and provides some predefined statistics about the data which can be queried with the tool itself.
get in contact
There are two prefered options to choose from to get in contact for feature request, bug reports, question and everything else related to photo stats:
- the ticket tracker: https://todo.sr.ht/~rwa/photo-workflow
- the mailing list: https://lists.sr.ht/~rwa/photo-workflow
exiftool needs to be installed on your system, no matter if you use prebuilt binarys or the bare scripts.
using binary (recommended)
There are prebuilt binarys (currently x86_64 linux only) and packages for Arch Linux and derivatives available for every ref.
using bare scripts
Simply clone the repo or manually download the scripts from https://git.sr.ht/~rwa/photo-stats/
To run the script, open a shell and invoke
perl phosta.pl, on most systems it should be sufficient to just invoke
phosta.pl (after you granted execute-permissions to the script).
prerequisites for running the pure scripts
- Perl 5.32 (or newer)
Additionally the following perl modules need to be installed:
- loading of EXIF data from media files to a self-contained database
- querying different statistics from the gathered data
- available fields
- camera maker
- camera model (body)
- lens model
- focal length
- grouping with summarizing based on date&time of pictures
- filtering of data by
- time range of photos shot
- custom sorting of output by arbitrary fields
- output results in a table view to your terminal
Querying database ~/photos.db with 82 entries... .-----------------+-------+---------. | model | count | percent | +-----------------+-------+---------+ | SM-A320FL | 31 | 37.8% | | Nokia 2.2 | 18 | 22.0% | | XF10 | 15 | 18.3% | | - | 9 | 11.0% | | STH100-2 | 3 | 3.7% | | iPhone SE | 1 | 1.2% | | PENTAX KP | 1 | 1.2% | | PENTAX K-5 II s | 1 | 1.2% | | PENTAX K-3 II | 1 | 1.2% | | PENTAX K-01 | 1 | 1.2% | | GR II | 1 | 1.2% | '-----------------+-------+---------'
Before you can query some stats, the EXIF data has to be extracted from your media files and written to the database. For available params and examples see the listing below.
You can add different folders one by another to the database, the import will take care the files added and avoid duplicates (currently based on file path). If you think something is messed up you can clean your database and start over.
After you've added some data, you can query different statistics which might be interesting. There are no predefined stats, instead you have the option to adjust the output to your needs using the different params listed below. More sophisticated filters (based on selected fields or file path) may come later.
usage: phosta(.pl) [options] generic options: -D <file> : path and name of the db file to use, defaults to <workingdir>/photo_stats.db This option is automatically saved in the user conf, you can omit this option if you always use the same db -c : clear the database -v : be verbose - print some debug output --help : show this help data gathering: -p <folder> : populate database from the files in the specified folder Media files in the given folder and every subfolder are scanned, EXIF data extracted and pulled into the database -E <ext> : list of comma separated extensions used for scanning image files, defaults to jpg,jpeg only media files which match (case-insensitive!) the given extensions are added to the database This option is saved to the user conf stats querying: -g : group by time range, defaults to total (which means no grouping by time range) allowed values: year, month, week, hour -s <fields> : specify the information you want to select, defaults to none (just show number of images) allowed values: maker, model, lensmake, lens, aperture, exposuretime, iso, focallength, focallength35mm multiple fields should be listed comma-separated -t <range> : only take images into account which have been taken in the given timerange <range> must be specified as 'YYYYMMDD-YYYYMMDD', you can omit one value -n <number> : limit the resultset to <number> of lines -o <fields> : sort your output by the given fields (sequence matters!) in descending order allowed values: any comma separated combination of the values of -t and -s param and 'count' -r : sort in reverse (ascending) order examples: phosta -E jpg,jpeg,tiff -D ~/Documents/stats.db -p ~/Pictures load EXIF data of files with the extensions jpg, jpeg and tiff in folder ~/Pictures to the database located in ~/Documents/stats.db phosta -s model -g month -t 20190101-20121231 -o month,count show number of pictures taken with a specific camera body in 2019 grouped by month, sorted by newest month first phosta -n 10 -s lens -o count show top 10 lenses used the most over all pictures taken
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.
Can i add different folders to the statistics?
-cparam when populating the database to avoid cleaning up old values. The tool will take care that now duplicates are added.