import urllib import json from htmlgenerators import artistLink def replacedict(keys,dbport): response = urllib.request.urlopen("http://localhost:" + str(dbport) + "/issues") db_data = json.loads(response.read()) i = 0 html = "" if db_data["inconsistent"]: html += "" html += "" html += """""" html += "" i += 1 for d in db_data["duplicates"]: html += "" html += "" html += """""" html += """""" html += "" i += 1 for c in db_data["combined"]: html += "" html += "" html += """""" html += "" i += 1 for n in db_data["newartists"]: html += "" html += "" html += """""" html += "" i += 1 html += "
The current database wasn't built with all current rules in effect. Any problem below might be a false alarm and fixing it could create redundant rules.
Rebuild the database
'" + artistLink(d[0]) + "'" html += " is a possible duplicate of " html += "'" + artistLink(d[1]) + "'
""" + d[1] + """ is correct
""" + d[0] + """ is correct
'" + artistLink(c[0]) + "' sounds like the combination of " + str(len(c[1])) + " artists: " for a in c[1]: html += "'" + artistLink(a) + "' " html += "
Fix it
Is '" + n[0] + "' in '" + artistLink(n[1]) + "' an artist?
Yes
" return {"KEY_ISSUESLIST":html,"KEY_ISSUES":str(i)}