WEEE-Open / sardina

Our developers' section stats, computed hic et nunc
3 stars 0 forks source link

Add pie chart for used languages #20

Closed e-caste closed 4 years ago

e-caste commented 4 years ago

The result should be a pie chart with e.g. 42% PHP 41.9% PHP, 10% Bash, 3% VHDL, 3.1% JavaScript

alecello commented 4 years ago

Should we add a prompt and relative command line option to ask the user wether they want to generate those stats or do we just generate them whenever we generate SLOC stats?

Also, should we add those statistics to the textual output too?

e-caste commented 4 years ago

@alecello If they can be computed with the SLOC stats (and they should, since cloc provides the means to do so) then do it.
They can’t be generated with the —-no-cloc option, so in that case skip it.

The best output should probably be:

alecello commented 4 years ago

@e-caste It's possible to implement this independently from cloc with the GitHub API: https://api.github.com/repos/{owner}/{repo}/languages

This way the stats can also be generated with cloc but need a separate set of requests.

e-caste commented 4 years ago

@alecello Then we can:

Then, let’s add a command line option and corresponding interactive prompt

e-caste commented 4 years ago

Also, I have not specified this, but it makes sense to also have a global statistic with used languages.
I know that GitHub computes used languages for each repo, and the corresponding pie chart could also be added to the repo-specific graphs, but what I am really interested in is the global language usage (so that we can add it to our yearly report).

e-caste commented 4 years ago

Closed with #22