-- Leo's gemini proxy

-- Connecting to gmn.clttr.info:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

git clone git://git.clttr.info/photo-stats.git

commits/

refs/

tree/


Photo Stats


This project is a small statistic generator for the terminal which accumulates data about your photographical habits.


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 methods to query the gathered data and gain some statistical insight.


SQlite

exiftool


For extensive usage information see `man phosta`.


features


loading of EXIF data from media files to a self-contained database

apply aliases to unify names of bodies or lenses

querying different statistics from the gathered data

available fields

file

camera maker

camera model (body)

lens maker

lens model

focal length (physical and 35mm equivalent)

iso

aperture

exposure time

grouping with summarizing based on date&time of pictures

year

month

week

hour

filtering of data by

time range of photos shot

values in fields in "CONTAINS" and "NOT CONTAINS" mode

lines with empty fields

custom sorting of output by arbitrary fields

output results to your terminal in a table or a simple graph view


usage


Before you can query some stats, the EXIF data has to be extracted from your media files and written to the database.


You can add different folders one by another to the database, the import will take care the files added and avoid duplicates (based on file path and name). 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.


For a complete list of params and example querys use `phosta --help`.


example output


The output will be shown as a bar graph when you select only one output column:


$ ./phosta -s model -f maker=ricoh -o model
Querying database ~/photo_stats.db with 29399 entries...

Applied filters:
   - *maker* LIKE **ricoh**

A total of **5090 images** matched your criteria.

          RICOH WG-4 |                                                    |  1.1% (56)
         PENTAX MX-1 | **                                                 |  4.9% (251)
           PENTAX KP | *********                                          | 19.7% (1005)
         PENTAX K-S2 | **************                                     | 29.5% (1502)
         PENTAX K-S1 | **********                                         | 21.6% (1098)
       PENTAX K-3 II | ********                                           | 17.0% (863)
               GR II | *                                                  |  2.2% (114)
           Caplio R7 | *                                                  |  3.9% (201)


or as a table when you choose more then one field:


Querying database ~/photo_stats.db with 29399 entries...

Applied filters:
   - *maker* LIKE **ricoh**

A total of **5090 images** matched your criteria.

.-----------------------------+---------------+-------+---------.
| maker                       | model         | count | percent |
+-----------------------------+---------------+-------+---------+
| RICOH IMAGING COMPANY, LTD. | RICOH WG-4    | 56    | 1.1%    |
| PENTAX RICOH IMAGING        | PENTAX MX-1   | 251   | 4.9%    |
| RICOH                       | PENTAX KP     | 52    | 1.0%    |
| RICOH IMAGING COMPANY, LTD. | PENTAX KP     | 953   | 18.7%   |
| RICOH IMAGING COMPANY, LTD. | PENTAX K-S2   | 1502  | 29.5%   |
| RICOH IMAGING COMPANY, LTD. | PENTAX K-S1   | 1098  | 21.6%   |
| RICOH IMAGING COMPANY, LTD. | PENTAX K-3 II | 863   | 17.0%   |
| RICOH IMAGING COMPANY, LTD. | GR II         | 114   | 2.2%    |
| RICOH                       | Caplio R7     | 201   | 3.9%    |
'-----------------------------+---------------+-------+---------'

Installation


Clone the repo, then run


$ make
$ sudo make install

For ArchLinux, `phosta` is available as an AUR package that takes care of the dependencies.


AUR package


To run the script, open a shell and invoke `phosta`.


prerequisites for running the pure scripts


exiftool

SQLite 3

Perl 5.30 (or newer)


Additionally the following perl modules need to be installed:


File::HomeDir

File::Spec::Functions

Perl::DBD::SQLite

Perl::DBI

Perl::Modern

Text::SimpleTable::AutoWidth

Term::AnsiColor

Scalar:Util

-- Response ended

-- Page fetched on Sun May 19 00:13:36 2024