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] [-e MAPFILE] [-o OUTPUT] [--no-aggregation] [--no-recursion] [--no-timing] [-s] [-v] path [path ...]

Calculates file size statistics for the specified folder(s).

positional arguments:

path(s) the folder(s) 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-aggregation

Do not aggregate results from all specified paths together

--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

If multiple folders are specified, the results are aggregated together, unless the –no-aggregation flag is used. If –no-aggregation is specified along with the -o (output csv file) flag, then one csv file will be created per input folder (by appending a “-<index>” onto the end of the specified file name, e.g. stats-1.csv, stats-2.csv, etc.

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.4.1.zip (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storage_stats-0.4.1-py2-none-any.whl (15.0 kB view details)

Uploaded Python 2

File details

Details for the file storage_stats-0.4.1.zip.

File metadata

  • Download URL: storage_stats-0.4.1.zip
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for storage_stats-0.4.1.zip
Algorithm Hash digest
SHA256 0eb62bd1321b914b6706bad15a350cdc8ffa024ac8820ebec47eeb8aa6353979
MD5 c985e2127714bc0ed84fd48159914110
BLAKE2b-256 e9d6b895223fad1e07453abcc85d465f9be3e854e5edc9133d85cd00c55c7c62

See more details on using hashes here.

File details

Details for the file storage_stats-0.4.1-py2-none-any.whl.

File metadata

File hashes

Hashes for storage_stats-0.4.1-py2-none-any.whl
Algorithm Hash digest
SHA256 3548e22afce65dd18469bedf4da2eb152c56918899481333fb03d749461ed556
MD5 55e4a12e3eb8cac83d0116b3dbbecd32
BLAKE2b-256 dda7309b271bbeee67dbc5e665d23459ef57513eba0b2dc27623882c2db6120f

See more details on using hashes here.

Supported by

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