Skip to main content

Calculates count and average file size of files recorded by file extension

Project description

Calculates statistics about minimum, maximum and mean average file sizes for each file extension within a directory.

Apache V2

Intallation

pip install storage_stats

Documentation

Usage: storage_stats [-h] [-o OUTPUT] [--no-recursion] [-s] path

Calculates file size statistics for the specified folder

positional arguments:

path the folder to characterise

optional arguments:
-h, --help

Show the help message and exit

-e MAPFILE

User file overriding similar extension mappings

-o OUTPUT

CSV file to output statistics too

--no-recursion

Do not include sub-folders in stats

--no-timing

Turn off preprocessing of directory to improve run-time (no timing information provided)

-s, --silent

Turn off command line output (useful if you just want to output a CSV file)

-v, --version

Provide the version of this application

MAPFILE

MAPFILE should be a text file with one group of similar file extensions per line, separated by commas. Each line should be in lowercase and take the form:

.main_ext,.alt1,.alt2,etc

For example:

::

.jpeg,.jpg .tiff,.tif

Note the period in each extension.

The first extension listed will be the one referenced in the output.

Licence

Released under Apache version 2.0 license.

Contribute

  1. Fork the GitHub project

  2. Change the code and push into the forked project

  3. Submit a pull request

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

storage_stats-0.3.0.zip (10.1 kB view hashes)

Uploaded Source

Built Distribution

storage_stats-0.3.0-py2-none-any.whl (14.6 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page