Last active
November 26, 2018 15:15
-
-
Save yafkari/9fd92c33e44dd19f10296d7190d6b277 to your computer and use it in GitHub Desktop.
quick tool to list all the sounds found in the res folder for the bobot project
This file contains 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 os | |
for file in os.listdir("."): | |
if(file.split(".")[1] == ".mp3"): | |
text = "\"{}\": {{\n\t\"path\": \"./res/sounds/{}\"\n}},\n".format(file.split(".")[0], file) | |
with open('sounds.json', 'a+') as file: | |
file.write(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment