4 Home
René Wagner edited this page 6 months ago

Photo Stats

Some information about the general usage of photo stats.


Before querying some stats you need to populate the database(s), the stats generations only uses the database. There's no need to scan your media files again and again for different information. You don't even need access to your images when digging through the stats.

config file

collect data

Based on filename, the importer will take care that no duplicates will be added to the database. When an already existing file is scanned again, it's data is updated.

You could use as many different databases as you'd like to, whatever suits your needs. Use the -D param to specify on which database file you want to operate.

text aliases

A simple way to deal with different names for bodies and lenses that are used by different raw converters is the usage of aliases.

The aliases can be defined in the file ~/phosta.alias, which should hold one alias definition by line. Each definition consists of an original string which should be replaced and a new string separated by atleast one tabulator, e.g.:

Old company     new company
lensname        real lensname

The aliases will be applied during data import in the order they appear in the file.

querying data

The stats are basically infos about how much images you have taken match a specific criteria, for example has been taken with a specific camera body. There are different filters available to match

selecting data

You can use the -s param to select specific information to build stats about. Currently the following fields are collected and stored in the database:

  • file
  • maker
  • model
  • lens maker
  • lens
  • aperture
  • exposuretime
  • iso
  • focallength
  • focallength35mm


Filters allow you to

by time range

Using the -t param you can filter the images that have been taken during a given period.

You need to specify the timerange in a form of YYYYMMDD-YYYYMMDD for starting date to end date.

arbitrary text filter


limiting output

You can limit the output to the top results using the -n param. The tool will tell you how many lines are skipped due to this param.

Additionally there's the -e switch to skip the "empty" result. The empty result occurs especially on some EXIF fields like exposure time, aperture and the like where sometimes invalid values are stored in the images.

custom ordering

By default the ordering starts with the results with the most count and descends. You can enforce an arbitrary ordering by specifying the fields you want to order by with the -o param.

Additionally there's the -r flag to invert the sort order, which means order in ascending manner.