photo-stats

terminal statistics processor about your photographic habits
git clone git://git.clttr.info/photo-stats.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

README.md (4612B)


      1 # Photo Stats
      2 
      3 This project is a small statistic generator for the terminal which accumulates data about your photographical habits.
      4 
      5 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.
      6 
      7 **Additional information can be found on the [wiki page](https://src.clttr.info/rwa/photo-stats/wiki/Home).**
      8 
      9 ## features
     10 - loading of EXIF data from media files to a self-contained database
     11 - apply aliases to unify names of bodies or lenses
     12 - querying different statistics from the gathered data
     13 - available fields
     14     - file
     15     - camera maker
     16     - camera model (body)
     17     - lens model
     18     - focal length
     19     - iso
     20     - aperture
     21 - grouping with summarizing based on date&time of pictures
     22     - year
     23     - month
     24     - week
     25     - hour
     26 - filtering of data by
     27     - time range of photos shot
     28     - values in fields in "CONTAINS" and "NOT CONTAINS" mode
     29 - custom sorting of output by arbitrary fields
     30 - output results in a table view to your terminal
     31 
     32 ## usage
     33 Before you can query some stats, the EXIF data has to be extracted from your media files and written to the database. 
     34 
     35 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.
     36 
     37 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. 
     38 
     39 For a complete list of params and example querys use `phosta --help` or have a look at the [wiki](https://src.clttr.info/rwa/photo-stats/wiki/Params).
     40 
     41 ### example output
     42 The output will be shown as a bar graph when you select only one output column:
     43 ```
     44 $ ./phosta -s model -f maker=ricoh -o model
     45 Querying database ~/photo_stats.db with 29399 entries...
     46 
     47 Applied filters:
     48    - *maker* LIKE **ricoh**
     49 
     50 A total of **5090 images** matched your criteria.
     51 
     52           RICOH WG-4 |                                                    |  1.1% (56)
     53          PENTAX MX-1 | **                                                 |  4.9% (251)
     54            PENTAX KP | *********                                          | 19.7% (1005)
     55          PENTAX K-S2 | **************                                     | 29.5% (1502)
     56          PENTAX K-S1 | **********                                         | 21.6% (1098)
     57        PENTAX K-3 II | ********                                           | 17.0% (863)
     58                GR II | *                                                  |  2.2% (114)
     59            Caplio R7 | *                                                  |  3.9% (201)
     60 
     61 ```
     62 
     63 or as a table when you choose more then one field:
     64 ```
     65 Querying database ~/photo_stats.db with 29399 entries...
     66 
     67 Applied filters:
     68    - *maker* LIKE **ricoh**
     69 
     70 A total of **5090 images** matched your criteria.
     71 
     72 .-----------------------------+---------------+-------+---------.
     73 | maker                       | model         | count | percent |
     74 +-----------------------------+---------------+-------+---------+
     75 | RICOH IMAGING COMPANY, LTD. | RICOH WG-4    | 56    | 1.1%    |
     76 | PENTAX RICOH IMAGING        | PENTAX MX-1   | 251   | 4.9%    |
     77 | RICOH                       | PENTAX KP     | 52    | 1.0%    |
     78 | RICOH IMAGING COMPANY, LTD. | PENTAX KP     | 953   | 18.7%   |
     79 | RICOH IMAGING COMPANY, LTD. | PENTAX K-S2   | 1502  | 29.5%   |
     80 | RICOH IMAGING COMPANY, LTD. | PENTAX K-S1   | 1098  | 21.6%   |
     81 | RICOH IMAGING COMPANY, LTD. | PENTAX K-3 II | 863   | 17.0%   |
     82 | RICOH IMAGING COMPANY, LTD. | GR II         | 114   | 2.2%    |
     83 | RICOH                       | Caplio R7     | 201   | 3.9%    |
     84 '-----------------------------+---------------+-------+---------'
     85 ```
     86 
     87 ## requirements
     88 The famous `exiftool` needs to be installed on your system.
     89 
     90 Simply clone the repo or manually download the scripts from https://src.clttr.info/rwa/photo-stats/
     91 
     92 To run the script, open a shell and invoke `perl phosta`, on most systems it should be sufficient to just invoke `phosta` (after you granted execute-permissions to the script).
     93 
     94 #### prerequisites for running the pure scripts
     95 
     96 - Perl 5.30 (or newer)
     97 
     98 Additionally the following perl modules need to be installed:
     99 
    100 - Cwd
    101 - File::HomeDir
    102 - File::Spec::Functions
    103 - Perl::DBD::SQLite
    104 - Perl::DBI
    105 - Text::SimpleTable::AutoWidth
    106 - Term::AnsiColor
    107 - Scalar:Util