Created
July 25, 2020 22:48
-
-
Save pagpeter/2baa0f802f63ed256d79e71c486a6cf2 to your computer and use it in GitHub Desktop.
view a beatsaber song in your terminal lol. I was bored
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
def PrintNote(note): | |
if note["_type"] == 1: | |
color = "■" #blue | |
elif note["_type"] == 0: | |
color = "□" #red | |
else: | |
color = "!" #blue | |
if note["_cutDirection"] == 0: | |
direction = "↑" | |
elif note["_cutDirection"] == 1: | |
direction = "↓" | |
elif note["_cutDirection"] == 2: | |
direction = "←" | |
elif note["_cutDirection"] == 3: | |
direction = "→" | |
elif note["_cutDirection"] == 4: | |
direction = "↖" | |
elif note["_cutDirection"] == 5: | |
direction = "↗" | |
elif note["_cutDirection"] == 6: | |
direction = "↙" | |
elif note["_cutDirection"] == 7: | |
direction = "↘" | |
elif note["_cutDirection"] == 8: | |
direction = "·" | |
else: | |
direction = "!" | |
spaces = note["_lineIndex"]*" " + " " | |
note = spaces+color+color+color+"\n" | |
note += spaces+color+direction+color+"\n" | |
note += spaces+color+color+color | |
return note | |
with open('expert.dat') as json_file: | |
data = json.load(json_file) | |
for x in data["_notes"]: | |
print(PrintNote(x)) | |
print() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment