cool artists stuff

This commit is contained in:
AIrjen
2023-10-01 08:27:50 +02:00
parent e660fde05f
commit e33c422d35
3 changed files with 59 additions and 12 deletions
+11 -2
View File
@@ -94,6 +94,17 @@ def csv_to_list(csvfilename, antilist=[], directory="./csvfiles/", lowerandstrip
return deduplicated_list
def artist_category_by_category_csv_to_list(csvfilename,artist):
csvlist = []
script_dir = os.path.dirname(os.path.abspath(__file__))
full_path = os.path.join(script_dir, "./csvfiles/" )
with open(full_path + csvfilename + ".csv", "r", newline="",encoding="utf8") as file:
reader = csv.DictReader(file, delimiter=",")
for row in reader:
if(row["Artist"] == artist):
csvlist.append(row["Tags"])
return csvlist
def artist_category_csv_to_list(csvfilename,category):
csvlist = []
script_dir = os.path.dirname(os.path.abspath(__file__))
@@ -105,8 +116,6 @@ def artist_category_csv_to_list(csvfilename,category):
csvlist.append(row["Artist"])
return csvlist
def load_config_csv():
csvlist = []
script_dir = os.path.dirname(os.path.abspath(__file__))