import os def instructions(keys): html = "" html += "" for f in os.listdir("rules/predefined"): if f.endswith(".tsv"): try: with open("rules/predefined/" + f) as tsvfile: line1 = tsvfile.readline() line2 = tsvfile.readline() if "# NAME: " in line1: name = line1.replace("# NAME: ","") else: name = f if "# DESC: " in line2: desc = line2.replace("# DESC: ","") else: desc = "" author = f.split("_")[0] except: continue html += "" if os.path.exists("rules/" + f): html += "" else: html += "" html += "" html += "" html += "" html += "" html += "
ModuleAuthorDescription
Remove:Add:" + name + "" + author + "" + desc + "
" pushresources = [] replace = {"KEY_PREDEFINED_RULESETS":html} return (replace,pushresources)