radio_project/make_m3u.py

17 lines
305 B
Python
Executable File

#! python3
import glob
m3u = input("Filename> ")
m3u = m3u + ".m3u"
f = open(m3u, "w")
for file in glob.iglob("/home/pi/radio_project/sounds/*"):
print(file + ": Do you want to add this?")
yn = input("y/n> ")
yn = str(yn)
if yn == "y":
f.write(file)
f.write("\n")
if yn == "n":
pass
f.close()