Beta-1.0:

- added new option to show song titles
This commit is contained in:
janis
2022-03-11 17:59:14 +01:00
parent 014640466c
commit 92350fc5aa
6 changed files with 61 additions and 19 deletions

View File

@@ -7,11 +7,26 @@ cvw = bin.csv_parsers.CsvWrite()
class InfoHandler:
def __init__(self):
pass
self.path = ""
self.__infos = ""
self.__style = ""
self.__outp1 = ""
self.__output = []
def infohandler(self, infos, path):
print(path, "path")
self.path = f"{path}/songlist.csv"
def infohandler(self, listname, path):
self.path = f"{path}/{listname}"
self.__info_doc = cvr.importing(self.path)
print(self.__info_doc)
print(infos)
self.__outp1 = ""
self.__output = []
for self.item in self.__info_doc:
self.__outp1 = []
self.__infos = ""
self.__infos = self.item
self.__outp1 = f"{self.__infos.pop(0)} - {self.__infos.pop(0)}"
try:
self.__style = self.__infos.pop(0)
self.__outp1 += f" | {self.__style}"
except:
pass
self.__output.append(self.__outp1)
cvw.app_str("./data/songtemp.csv", self.__output)