put bar first, improve output
This commit is contained in:
@@ -70,9 +70,7 @@ lines = [
|
||||
for lang, nbytes in pairs:
|
||||
pct = nbytes * 100 / total_bytes
|
||||
bar = "█" * int(pct / 2) # up to 50 chars
|
||||
lines.append(f"{lang} {bar} {pct:5.1f}% \n")
|
||||
lines.append(f"{bar} {lang}{pct:5.1f}%\\")
|
||||
|
||||
block = "<!--LANG_STATS_START-->\n" + "".join(lines) + "<!--LANG_STATS_END-->\n"
|
||||
|
||||
# ---------- output markdown block ----------
|
||||
print(block)
|
||||
for line in lines:
|
||||
print(line)
|
||||
|
||||
Reference in New Issue
Block a user