17 lines
308 B
Python
17 lines
308 B
Python
from lookup_sounds import Sound
|
|
from sys import argv
|
|
|
|
try:
|
|
filename = argv[1]
|
|
name = argv[2]
|
|
route = argv[3]
|
|
except IndexError:
|
|
print(f"Invalid args, {argv[0]} filename name route")
|
|
exit(2)
|
|
|
|
# Create new sound object
|
|
sound = Sound(filename, name, route)
|
|
|
|
print(sound.json())
|
|
sound.save()
|