- Read in fandom name substitutions from a central location

- Modify template to get rid of unused fields
- CSS tweaks
This commit is contained in:
mez 2025-07-21 20:10:52 +01:00
parent fb5e797988
commit 089a0143f6
5 changed files with 32 additions and 81 deletions

23
new.py
View file

@ -1,9 +1,10 @@
import datetime,os
from importlib import import_module
from bs4 import BeautifulSoup
import fandomsedit
def classgen(string):
return string.replace(" ","").replace("#","").replace("-","").replace("ç","c").replace("","").replace("é","e").replace("(","").replace(")","").replace(":","").lower()
return string.replace(" ","").replace("#","").replace("-","").replace("ç","c").replace("","").replace("É","E").replace("é","e").replace("(","").replace(")","").replace(":","").lower()
def stringno(theno):
if theno < 10:
@ -57,24 +58,8 @@ while ficcount > 0:
ficdict["completion"] = "complete"
ficdict["fandoms"] = []
for fandom in fileread.fandom:
if fandom == "FF15":
ficdict["fandoms"].append("Final Fantasy XV")
elif fandom == "FF16":
ficdict["fandoms"].append("Final Fantasy XVI")
elif fandom == "FF4":
ficdict["fandoms"].append("Final Fantasy IV")
elif fandom == "FF6":
ficdict["fandoms"].append("Final Fantasy VI")
elif fandom == "FF7":
ficdict["fandoms"].append("Final Fantasy VII")
elif fandom == "FF8":
ficdict["fandoms"].append("Final Fantasy VIII")
elif fandom == "FF9":
ficdict["fandoms"].append("Final Fantasy IX")
elif fandom == "FFX":
ficdict["fandoms"].append("Final Fantasy X")
elif fandom == "LOTR":
ficdict["fandoms"].append("Lord Of The Rings")
if fandom in fandomsedit.render:
ficdict["fandoms"].append(fandomsedit.render[fandom])
else:
ficdict["fandoms"].append(fandom)
ficlist.append(ficdict)