mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[docs] update 'wikimedia' capabilities in supportedsites.md
This commit is contained in:
parent
bd932b6860
commit
f52cf54e16
@ -1460,61 +1460,61 @@ Consider all listed sites to potentially be NSFW.
|
||||
<tr>
|
||||
<td>Wikimedia</td>
|
||||
<td>https://www.wikimedia.org/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Wikispecies</td>
|
||||
<td>https://species.wikimedia.org/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Wikimedia Commons</td>
|
||||
<td>https://commons.wikimedia.org/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MediaWiki</td>
|
||||
<td>https://www.mediawiki.org/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fandom</td>
|
||||
<td>https://www.fandom.com/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>wiki.gg</td>
|
||||
<td>https://www.wiki.gg/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Super Mario Wiki</td>
|
||||
<td>https://www.mariowiki.com/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bulbapedia</td>
|
||||
<td>https://bulbapedia.bulbagarden.net/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PidgiWiki</td>
|
||||
<td>https://www.pidgi.net/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Azur Lane Wiki</td>
|
||||
<td>https://azurlane.koumakan.jp/</td>
|
||||
<td>Articles</td>
|
||||
<td>Articles, Categories, Files, Wikis</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
|
@ -206,7 +206,7 @@ SUBCATEGORY_MAP = {
|
||||
"redirect" : "Pixiv Redirects",
|
||||
},
|
||||
"fapello": {
|
||||
"path": "Videos, Trending Posts, Popular Videos, Top Models",
|
||||
"path": ["Videos", "Trending Posts", "Popular Videos", "Top Models"],
|
||||
},
|
||||
"furaffinity": {
|
||||
"submissions": "New Submissions",
|
||||
@ -240,9 +240,6 @@ SUBCATEGORY_MAP = {
|
||||
"mangadex": {
|
||||
"feed" : "Followed Feed",
|
||||
},
|
||||
"nana": {
|
||||
"search": "Favorites, Search Results",
|
||||
},
|
||||
"nijie": {
|
||||
"followed": "Followed Users",
|
||||
"nuita" : "Nuita History",
|
||||
@ -313,7 +310,7 @@ SUBCATEGORY_MAP = {
|
||||
"uploads" : "",
|
||||
},
|
||||
"wallpapercave": {
|
||||
"image": "individual Images, Search Results",
|
||||
"image": ["individual Images", "Search Results"],
|
||||
},
|
||||
"weasyl": {
|
||||
"journals" : "",
|
||||
@ -326,6 +323,9 @@ SUBCATEGORY_MAP = {
|
||||
"wikiart": {
|
||||
"artists": "Artist Listings",
|
||||
},
|
||||
"wikimedia": {
|
||||
"article": ["Articles", "Categories", "Files"],
|
||||
},
|
||||
}
|
||||
|
||||
BASE_MAP = {
|
||||
@ -441,12 +441,23 @@ def category_text(c):
|
||||
return CATEGORY_MAP.get(c) or c.capitalize()
|
||||
|
||||
|
||||
def subcategory_text(c, sc):
|
||||
def subcategory_text(bc, c, sc):
|
||||
"""Return a human-readable representation of a subcategory"""
|
||||
if c in SUBCATEGORY_MAP:
|
||||
scm = SUBCATEGORY_MAP[c]
|
||||
if sc in scm:
|
||||
return scm[sc]
|
||||
txt = scm[sc]
|
||||
if not isinstance(txt, str):
|
||||
txt = ", ".join(txt)
|
||||
return txt
|
||||
|
||||
if bc and bc in SUBCATEGORY_MAP:
|
||||
scm = SUBCATEGORY_MAP[bc]
|
||||
if sc in scm:
|
||||
txt = scm[sc]
|
||||
if not isinstance(txt, str):
|
||||
txt = ", ".join(txt)
|
||||
return txt
|
||||
|
||||
if sc in SUBCATEGORY_MAP:
|
||||
return SUBCATEGORY_MAP[sc]
|
||||
@ -534,14 +545,14 @@ def build_extractor_list():
|
||||
# define table columns
|
||||
COLUMNS = (
|
||||
("Site", 20,
|
||||
lambda c, scs, d: category_text(c)),
|
||||
lambda bc, c, scs, d: category_text(c)),
|
||||
("URL" , 35,
|
||||
lambda c, scs, d: d),
|
||||
lambda bc, c, scs, d: d),
|
||||
("Capabilities", 50,
|
||||
lambda c, scs, d: ", ".join(subcategory_text(c, sc) for sc in scs
|
||||
if subcategory_text(c, sc))),
|
||||
lambda bc, c, scs, d: ", ".join(subcategory_text(bc, c, sc) for sc in scs
|
||||
if subcategory_text(bc, c, sc))),
|
||||
("Authentication", 16,
|
||||
lambda c, scs, d: AUTH_MAP.get(c, "")),
|
||||
lambda bc, c, scs, d: AUTH_MAP.get(c, "")),
|
||||
)
|
||||
|
||||
|
||||
@ -557,10 +568,10 @@ def generate_output(columns, categories, domains):
|
||||
tbody = []
|
||||
append = tbody.append
|
||||
|
||||
for name, base in categories.items():
|
||||
for bcat, base in categories.items():
|
||||
|
||||
if name and base:
|
||||
name = BASE_MAP.get(name) or (name.capitalize() + " Instances")
|
||||
if bcat and base:
|
||||
name = BASE_MAP.get(bcat) or (bcat.capitalize() + " Instances")
|
||||
append('\n<tr>\n <td colspan="4"><strong>' +
|
||||
name + '</strong></td>\n</tr>')
|
||||
clist = base.items()
|
||||
@ -571,7 +582,7 @@ def generate_output(columns, categories, domains):
|
||||
append("<tr>")
|
||||
for column in columns:
|
||||
domain = domains[category]
|
||||
content = column[2](category, subcategories, domain)
|
||||
content = column[2](bcat, category, subcategories, domain)
|
||||
append(" <td>" + content + "</td>")
|
||||
append("</tr>")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user