put bar first, improve output
This commit is contained in:
@@ -70,9 +70,7 @@ lines = [
|
|||||||
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} {bar} {pct:5.1f}% \n")
|
lines.append(f"{bar} {lang}{pct:5.1f}%\\")
|
||||||
|
|
||||||
block = "<!--LANG_STATS_START-->\n" + "".join(lines) + "<!--LANG_STATS_END-->\n"
|
for line in lines:
|
||||||
|
print(line)
|
||||||
# ---------- output markdown block ----------
|
|
||||||
print(block)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user