Skip to content

Commit 2d3fb0e

Browse files
authored
Merge pull request #57 from sommersoft/mark_this_down
Markdownify PyPi Stats Table
2 parents ed7700d + bdfe756 commit 2d3fb0e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

adabot/circuitpython_library_download_stats.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,13 @@ def run_stat_check():
142142

143143
pypi_downloads = {}
144144
pypi_failures = []
145-
downloads_list = [[" Repo", "Last Week", "Total"],
146-
[" ----", "---------", "-----"]]
145+
downloads_list = [["| Repo", "| Last Week", "| Total |"],
146+
["| ----", "|:--------:", "|:-----:|"]]
147147
output_handler("Adafruit CircuitPython Library PyPi downloads: ")
148+
output_handler()
148149
pypi_downloads, pypi_failures = get_pypi_stats()
149150
for stat in sorted(pypi_downloads.items(), key=operator.itemgetter(1,1), reverse=True):
150-
downloads_list.append([" " + stat[0], stat[1][0], stat[1][1]])
151+
downloads_list.append(["| " + str(stat[0]), " | " + str(stat[1][0]), " | " + str(stat[1][1]) +" |"])
151152

152153
long_col = [(max([len(str(row[i])) for row in downloads_list]) + 3)
153154
for i in range(len(downloads_list[0]))]

0 commit comments

Comments
 (0)