diff --git a/scripts/supportedsites.py b/scripts/supportedsites.py
index 74fcff6e..ddbcbb46 100755
--- a/scripts/supportedsites.py
+++ b/scripts/supportedsites.py
@@ -682,52 +682,50 @@ COLUMNS = (
def generate_output(columns, categories, domains):
thead = []
- append = thead.append
- append("
")
+ thead.append("
")
for column in columns:
- append(" | " + column[0] + " | ")
- append("
")
+ thead.append(f" {column[0]} | ")
+ thead.append("")
tbody = []
- append = tbody.append
-
for bcat, base in categories.items():
if bcat and base:
name = BASE_MAP.get(bcat) or (bcat.capitalize() + " Instances")
- append('\n\n | ' +
- name + ' | \n
')
+ tbody.append(f"""
+
+ | {name} |
+
\
+""")
clist = base.items()
else:
clist = sorted(base.items(), key=category_key)
for category, subcategories in clist:
- append("")
+ tbody.append("
")
for column in columns:
domain = domains[category]
content = column[2](bcat, category, subcategories, domain)
- append(" | " + content + " | ")
- append("
")
+ tbody.append(f" {content} | ")
+ tbody.append("")
- TEMPLATE = """# Supported Sites
+ NL = "\n"
+ GENERATOR = "/".join(os.path.normpath(__file__).split(os.sep)[-2:])
+ return f"""\
+# Supported Sites
-
+
Consider all listed sites to potentially be NSFW.
-{}
+{NL.join(thead)}
-{}
+{NL.join(tbody)}
"""
- return TEMPLATE.format(
- "/".join(os.path.normpath(__file__).split(os.sep)[-2:]),
- "\n".join(thead),
- "\n".join(tbody),
- )
categories, domains = build_extractor_list()