[scripts/supportedsites] convert subcategories with '-'

This commit is contained in:
Mike Fährmann
2025-09-03 22:11:34 +02:00
parent 8967a6e87e
commit d30d42b715
2 changed files with 14 additions and 28 deletions

View File

@@ -223,11 +223,6 @@ SUBCATEGORY_MAP = {
"related-pin" : "related Pins",
"related-board" : "",
"ao3": {
"user-works" : "",
"user-series" : "",
"user-bookmark": "Bookmarks",
},
"arcalive": {
"user": "User Posts",
},
@@ -236,7 +231,6 @@ SUBCATEGORY_MAP = {
"collections": "",
},
"bilibili": {
"user-articles": "User Articles",
"user-articles-favorite": "User Article Favorites",
},
"bluesky": {
@@ -252,11 +246,8 @@ SUBCATEGORY_MAP = {
"posts" : "Post Listings",
"search-models": "Model Searches",
"search-images": "Image Searches",
"user-models": "User Models",
"user-images": ("User Images", "Image Reactions"),
"user-posts" : "User Posts",
"user-videos": ("User Videos", "Video Reactions"),
"user-collections" : "User Collections",
"generated": "Generated Files",
},
"coomer": {
@@ -265,14 +256,12 @@ SUBCATEGORY_MAP = {
"posts" : "",
},
"Danbooru": {
"artist-search": "Artist Searches",
"favgroup": "Favorite Groups",
},
"desktopography": {
"site": "",
},
"deviantart": {
"gallery-search": "Gallery Searches",
"stash" : "Sta.sh",
"status": "Status Updates",
"watch-posts": "",
@@ -287,6 +276,9 @@ SUBCATEGORY_MAP = {
"supporting": "Supported User Feed",
"redirect" : "Pixiv Redirects",
},
"fansly": {
"lists": "Account Lists",
},
"fapello": {
"path": ["Videos", "Trending Posts", "Popular Videos", "Top Models"],
},
@@ -316,11 +308,6 @@ SUBCATEGORY_MAP = {
"itaku": {
"posts": "",
},
"iwara": {
"user-images": "User Images",
"user-videos": "User Videos",
"user-playlists": "User Playlists",
},
"kemono": {
"discord" : "Discord Servers",
"discord-server": "",
@@ -333,16 +320,12 @@ SUBCATEGORY_MAP = {
"lensdump": {
"albums": "",
},
"lofter": {
"blog-posts": "Blog Posts",
},
"mangadex": {
"feed": "Updates Feed",
"following" : "Library",
"list": "MDLists",
},
"misskey": {
"note" : "Notes",
"notes": "User Notes",
},
"nijie": {
@@ -360,9 +343,6 @@ SUBCATEGORY_MAP = {
},
"pixiv": {
"me" : "pixiv.me Links",
"novel-bookmark": "Novel Bookmarks",
"novel-series": "Novel Series",
"novel-user": "",
"pixivision": "pixivision",
"sketch": "Sketch",
"unlisted": "Unlisted Works",
@@ -599,11 +579,17 @@ def subcategory_text(bc, c, sc):
if sc in SUBCATEGORY_MAP:
return SUBCATEGORY_MAP[sc]
sc = sc.capitalize()
if "-" in sc:
sc = " ".join(s.capitalize() for s in sc.split("-"))
else:
sc = sc.capitalize()
if sc.endswith("y"):
sc = sc[:-1] + "ies"
sc = f"{sc[:-1]}ies"
elif sc.endswith("h"):
sc = f"{sc}es"
elif not sc.endswith("s"):
sc += "s"
sc = f"{sc}s"
return sc