Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:returns: None
"""
# Get this month's file list
down_filelist, _ = gen_file_list()
# Iterate over every file in this week
week = {}
for file in down_filelist[-7:]:
week[file.split('/')[-1]] = calculate(read_files([file])) // MB
data = sorted(week.items())
print("Data downloaded this week:\n")
termgraph.chart(
labels=["%s%s" % (d[0], ordinal_suffix(int(d[0]))) for d in data],
data=[d[1] for d in data],
args=dict(
width=30,
suffix=" MB",
format="{:>5.0f}",
)
)
print("Total: %d MB" % sum([d[1] for d in data]))