njanakiev/folderstats

Request to include another input option --paterrn <pattern>

Closed this issue · 1 comments

Hi Njanakiev,

First of all thanks for useful module. I just wanted to propose an improvement to this. Could we please add a option to restrict the stats on files that has specific extension?

Reasoning is that, often people are interested in getting the stats on specific file extensions rather than all the files in specific folder. If this option is present it would be helpful.

Something like this would be helpful.

Note: I can submit a PR if you wish. Thanks.

parser.add_argument('-e', action='store_true',
dest='extension', default=False,
help='restrict the stats on file extension',
required=False)

Thanks & regards,
Sujaikumar

Thanks for the suggestion @sujaikumars! This is indeed a good addition! I've added it and also added excluding of particular file names as an option in the new 0.4.0 release.