From d30d42b71522d0c367a069bfbd618b9df2719aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 3 Sep 2025 22:11:34 +0200 Subject: [PATCH] [scripts/supportedsites] convert subcategories with '-' --- docs/supportedsites.md | 4 ++-- scripts/supportedsites.py | 38 ++++++++++++-------------------------- 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/docs/supportedsites.md b/docs/supportedsites.md index fcffb9dc..ce04321a 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -106,7 +106,7 @@ Consider all listed sites to potentially be NSFW. Archive of Our Own https://archiveofourown.org/ - Search Results, Series, Subscriptions, Tag Searches, User Profiles, Bookmarks, Works + Search Results, Series, Subscriptions, Tag Searches, User Profiles, User Bookmarks, User Series, User Works, Works Supported @@ -280,7 +280,7 @@ Consider all listed sites to potentially be NSFW. Fansly https://fansly.com/ - Creator-posts, Home Feed, Lists, Posts + Creator Posts, Home Feed, Lists, Account Lists, Posts diff --git a/scripts/supportedsites.py b/scripts/supportedsites.py index e6f7109e..dd082c0a 100755 --- a/scripts/supportedsites.py +++ b/scripts/supportedsites.py @@ -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