fix auto-generation of supportedsites.rst

This commit is contained in:
Mike Fährmann
2020-01-13 22:29:42 +01:00
parent 3c534d8c2c
commit a6b98d3bec
2 changed files with 43 additions and 14 deletions

View File

@@ -7,7 +7,7 @@ Site URL Capabilities
==================== =================================== ================================================== ================
35PHOTO https://35photo.pro/ Genres, individual Images, User Profiles
3dbooru http://behoimi.org/ Pools, Popular Images, Posts, Tag-Searches
4chan https://www.4chan.org/ Threads
4chan https://www.4chan.org/ Boards, Threads
4plebs https://archive.4plebs.org/ Threads
500px https://500px.com/ Galleries, individual Images, User Profiles
8muses https://www.8muses.com/ Albums
@@ -74,7 +74,7 @@ MangaPark https://mangapark.me/ Chapters, Manga
Mangareader https://www.mangareader.net/ Chapters, Manga
Mangoxo https://www.mangoxo.com/ Albums, Channels Optional
Naver https://blog.naver.com/ Blogs, Posts
Newgrounds https://www.newgrounds.com/ individual Images, User Profiles, Videos Optional
Newgrounds https://www.newgrounds.com/ |newgrounds-C| Optional
Ngomik http://ngomik.in/ Chapters
nhentai https://nhentai.net/ Galleries, Search Results
Niconico Seiga https://seiga.nicovideo.jp/ individual Images, User Profiles Required
@@ -118,7 +118,7 @@ VSCO https://vsco.co/ Collections, individual
Wallhaven https://wallhaven.cc/ individual Images, Search Results |wallhaven-A|
Warosu https://warosu.org/ Threads
Weibo https://www.weibo.com/ Images from Statuses, User Profiles
WikiArt.org https://www.wikiart.org/ Artists, Artworks
WikiArt.org https://www.wikiart.org/ Artists, Artist Listings, Artworks
World Three http://www.slide.world-three.org/ Chapters, Manga
xHamster https://xhamster.com/ Galleries, User Profiles
XVideos https://www.xvideos.com/ Galleries, User Profiles
@@ -140,10 +140,11 @@ Turboimagehost https://www.turboimagehost.com/ individual Images
.. |deviantart-C| replace:: Collections, Deviations, Favorites, Folders, Galleries, Journals, Popular Images, Scraps, Sta.sh, User Profiles
.. |flickr-C| replace:: Albums, Favorites, Galleries, Groups, individual Images, Search Results, User Profiles
.. |hentaifoundry-C| replace:: Favorites, individual Images, Popular Images, Recent Images, Scraps, User Profiles
.. |imgur-C| replace:: Albums, Favorites, Galleries, individual Images, User Profiles
.. |imgur-C| replace:: Albums, Favorites, Galleries, individual Images, Subreddits, User Profiles
.. |instagram-C| replace:: Channels, individual Images, Stories, Tag-Searches, User Profiles
.. |newgrounds-C| replace:: Art, Audio, individual Images, Media Files, Movies, User Profiles
.. |nijie-C| replace:: Doujin, Favorites, individual Images, User Profiles
.. |pixiv-C| replace:: Favorites, Follows, pixiv.me Links, Rankings, Search Results, User Profiles, Individual Images
.. |pixiv-C| replace:: Favorites, Follows, pixiv.me Links, Rankings, Search Results, User Profiles, individual Images
.. |reddit-C| replace:: individual Images, Submissions, Subreddits, User Profiles
.. |smugmug-C| replace:: Albums, individual Images, Images from Users and Folders
.. |wallhaven-A| replace:: Optional (`API Key <configuration.rst#extractorwallhavenapi-key>`__)

View File

@@ -85,27 +85,48 @@ CATEGORY_MAP = {
}
SUBCATEGORY_MAP = {
"artwork": "Artwork Listings",
"artists": "",
"doujin" : "Doujin",
"gallery": "Galleries",
"image" : "individual Images",
"issue" : "Comic-Issues",
"manga" : "Manga",
"me" : "pixiv.me Links",
"media" : "Media Timelines",
"path" : "Images from Users and Folders",
"pinit" : "pin.it Links",
"popular": "Popular Images",
"recent" : "Recent Images",
"search" : "Search Results",
"stash" : "Sta.sh",
"status" : "Images from Statuses",
"tag" : "Tag-Searches",
"user" : "User Profiles",
"work" : "Individual Images",
"following" : "",
"related-pin" : "related Pins",
"related-board": "",
"artstation": {
"artwork": "Artwork Listings",
},
"deviantart": {
"stash": "Sta.sh",
},
"newgrounds": {
"art" : "Art",
"audio": "Audio",
"media": "Media Files",
},
"pinterest": {
"pinit": "pin.it Links",
},
"pixiv": {
"me" : "pixiv.me Links",
"work": "individual Images",
},
"smugmug": {
"path": "Images from Users and Folders",
},
"twitter": {
"media": "Media Timelines",
},
"wikiart": {
"artists": "Artist Listings",
},
}
AUTH_MAP = {
@@ -170,9 +191,16 @@ def category_text(cls):
def subcategory_text(cls):
"""Return a human-readable representation of a subcategory"""
sc = cls.subcategory
c, sc = cls.category, cls.subcategory
if c in SUBCATEGORY_MAP:
scm = SUBCATEGORY_MAP[c]
if sc in scm:
return scm[sc]
if sc in SUBCATEGORY_MAP:
return SUBCATEGORY_MAP[sc]
sc = sc.capitalize()
return sc if sc.endswith("s") else sc + "s"