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. This can be used in two ways, one-liner / interactive method.
The interactive mode can be enabled by using the --interactive
or -i
flag. This mode of usage does not require any additional argument. Please not that the arguments passed (if any) will be invalid.
One-liner uses the classic argument parsing method to generate output. This is useful for automating the report generation process. The only mandatory argument is --user / -u
which takes the FAS username as input.
python stats.py --user=nobody
or python stats.py -u nobody
will generate text based statistics of user nobody
from datagrepper.
--user / -u
--weeks / -w
--mode / -m
text
. (More features will be added soon)--category / -c
--output / -o
--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 default 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 blog-post.