whisper-swedish / list_songs.py
sharner
Add program for getting song list
e9b84ca
raw
history blame
374 Bytes
import json
class ListSongs:
@staticmethod
def get_song_list():
list_output = ""
with open("./swedish_christmas_songs.json", "r", encoding='utf-8') as f:
songs = json.load(f)
for song in songs:
list_output += "- " + song['name'][:-4].replace("_", " ") + "\n"
return list_output.strip()