simplify output
This commit is contained in:
@@ -66,13 +66,11 @@ pairs = sorted(totals.items(), key=lambda x: x[1], reverse=True)
|
||||
|
||||
lines = [
|
||||
"## 📊 Language Usage\n",
|
||||
"| Language | Percent |\n",
|
||||
"|----------|---------|\n",
|
||||
]
|
||||
for lang, nbytes in pairs:
|
||||
pct = nbytes * 100 / total_bytes
|
||||
bar = "█" * int(pct / 2) # up to 50 chars
|
||||
lines.append(f"| {lang} | {pct:5.1f}% {bar} |\n")
|
||||
lines.append(f"{lang} {bar} {pct:5.1f}% \n")
|
||||
|
||||
block = "<!--LANG_STATS_START-->\n" + "".join(lines) + "<!--LANG_STATS_END-->\n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user