simplify output

This commit is contained in:
Mark Eaton
2025-08-13 12:04:43 -04:00
parent 89cbb2d581
commit 0138790d15
+1 -3
View File
@@ -66,13 +66,11 @@ pairs = sorted(totals.items(), key=lambda x: x[1], reverse=True)
lines = [ lines = [
"## 📊 Language Usage\n", "## 📊 Language Usage\n",
"| Language | Percent |\n",
"|----------|---------|\n",
] ]
for lang, nbytes in pairs: for lang, nbytes in pairs:
pct = nbytes * 100 / total_bytes pct = nbytes * 100 / total_bytes
bar = "" * int(pct / 2) # up to 50 chars 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" block = "<!--LANG_STATS_START-->\n" + "".join(lines) + "<!--LANG_STATS_END-->\n"