@cli.command(name='<STR_LIT>')<EOL>def contribution_breakdown():
args = ['<STR_LIT>', '<STR_LIT>']<EOL>counts = {}<EOL>line_format = '<STR_LIT>'<EOL>files = subprocess.check_output(['<STR_LIT>', '<STR_LIT>']).decode("<STR_LIT:utf-8>").split('<STR_LIT:\n>')<EOL>for f in files[:-<NUM_LIT:1>]:<EOL><INDENT>if '<STR_LIT>' in f or '<STR_LIT>' in f:<EOL><INDENT>continue  <EOL><DEDENT>lines = subprocess.check_output(args + [f]).decode('<STR_LIT:utf-8>')<EOL>blames = [get_line_blame(line) for line in lines.split('<STR_LIT:\n>')]<EOL>for blame in blames:<EOL><INDENT>counts[blame] = counts.get(blame, <NUM_LIT:0>) + <NUM_LIT:1><EOL><DEDENT><DEDENT>total = sum([counts[count] for count in counts])<EOL>contribs = [(user, counts[user]) for user in counts]<EOL>contribs.sort(key=lambda x: x[<NUM_LIT:1>], reverse=True)<EOL>print(line_format.format('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'))<EOL>for user in contribs:<EOL><INDENT>percent = floor(<NUM_LIT> * user[<NUM_LIT:1>] / total)<EOL>if percent == <NUM_LIT:0>: percent = '<STR_LIT>'<EOL>print(line_format.format(user[<NUM_LIT:0>], user[<NUM_LIT:1>], percent))<EOL><DEDENT>print(line_format.format('<STR_LIT>', total, <NUM_LIT:100>))<EOL>
Displays a table of the contributors and to what extent we have them to thank.