simplify output
This commit is contained in:
@@ -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"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user