The output gets sorted by title

main
Lasse Edfast 5 years ago
parent 6a2dfba472
commit 8dbb88be0a
  1. 1
      .gitignore
  2. 2
      musicreport.py

1
.gitignore vendored

@ -0,0 +1 @@
Music Report.csv

@ -32,7 +32,7 @@ for row in rows:
with open("Music Report.csv", "a+") as f:
f.truncate(0)
f.write("Title\tArtist\tDuration\n")
for key, value in d.items():
for key, value in sorted(d.items()):
minutes = str(int(value["duration"] / 60))
seconds = str(int(value["duration"] % 60))
if len(seconds) == 1:

Loading…
Cancel
Save