A simple CLI to tool to gather statistics from datagrepper
This tool will help anyone to pull statistics of any registered Fedora user with an active FAS account.
This tool usesargparse
to parse arguments. The only mandatory argument is -u / --user
which will take any FAS account name as argument.
python stats.py --user=nobody
or python stats.py -u nobody
will generate text based statistics of user nobody
ftom datagrepper.
--user / -u
* Takes any FAS Username as argument. There is no default value and the tool will throw an error if this argument is left blank/not used.
--weeks / -w
* Takes an integer value to represent number of weeks. Converts it into timedelta. (1week = 604,800 seconds). Default value is 1.
--mode / -m
text
. (More features will be added soon)--output / -o
* Takes a single word string input. This will define the output file name. This option is to be combined with the --mode/-m
argument. Please note that this option DOES NOT require an extension type. For instance, if you need an SVG output with the name nobody.svg
, the --output flag should be set as nobody
and not nobody.svg
. the dedault value is stats
python main.py --user=nobody
.svg
format : python main.py --user=foo --mode=svg
This will create stats.svg
in your $pwd
.
.png
format with output name as foo_stats.png
python main.py --user=foo --mode=png --output=foo_stats
Please take a look at this blogpost.