Add body styles to misc json and include them in the misc docs page

This commit is contained in:
Michiel Sikma
2020-03-21 15:26:54 +01:00
parent 393781d9f7
commit fedbadf8fe
17 changed files with 165 additions and 2 deletions

View File

@@ -194,7 +194,7 @@
"misc-groups": {
"body-style": {
"name": {
"eng": "Body styles"
"eng": "Body styles (shape)"
}
},
"ribbon": {

View File

@@ -1635,5 +1635,147 @@
"gen-3": "ribbon/world-ribbon.png"
}
}
],
"body-style": [
{
"name": {
"eng": "Pokémon consisting of only a head",
"jpn": "頭だけのポケモン",
"jpn_ro": "Kao dake no Pokémon"
},
"files": {
"gen-6": "body-style/head-gen6.png"
}
},
{
"name": {
"eng": "Pokémon consisting of a head and legs",
"jpn": "頭と脚だけのポケモン",
"jpn_ro": "Kao to ashi dake no Pokémon"
},
"files": {
"gen-6": "body-style/head-legs-gen6.png"
}
},
{
"name": {
"eng": "Pokémon with fins",
"jpn": "ひれが付いたポケモン",
"jpn_ro": "Hira ga tsuita Pokémon"
},
"files": {
"gen-6": "body-style/fins-gen6.png"
}
},
{
"name": {
"eng": "Pokémon with an insectoid body",
"jpn": "羽を持たない虫型のポケモン",
"jpn_ro": "Hane wo motanai mushikata no Pokémon"
},
"files": {
"gen-6": "body-style/insectoid-gen6.png"
}
},
{
"name": {
"eng": "Pokémon with a quadruped body",
"jpn": "4本脚のポケモン",
"jpn_ro": "Yonhon ashi no Pokémon"
},
"files": {
"gen-6": "body-style/quadruped-gen6.png"
}
},
{
"name": {
"eng": "Pokémon with two or more pairs of wings",
"jpn": "羽を持つ虫型のポケモン",
"jpn_ro": "Hane wo motsu mushikata no Pokémon"
},
"files": {
"gen-6": "body-style/wings-multiple-gen6.png"
}
},
{
"name": {
"eng": "Pokémon consisting of multiple bodies",
"jpn": "複数の体を持つポケモン",
"jpn_ro": "Fukusuu no karada wo motsu Pokémon"
},
"files": {
"gen-6": "body-style/multiple-gen6.png"
}
},
{
"name": {
"eng": "Pokémon with tentacles or a multiped body",
"jpn": "複数の脚を持つポケモン",
"jpn_ro": "Fukusuu no ashi wo motsu Pokémon"
},
"files": {
"gen-6": "body-style/tentacles-gen6.png"
}
},
{
"name": {
"eng": "Pokémon consisting of a head and a base",
"jpn": "頭と胴体だけのポケモン",
"jpn_ro": "Atama to doutai dake no Pokémon"
},
"files": {
"gen-6": "body-style/head-base-gen6.png"
}
},
{
"name": {
"eng": "Pokémon with a bipedal, tailed form",
"jpn": "尾を持つ2本脚のポケモン",
"jpn_ro": "O wo motsu nitai ashi no Pokémon"
},
"files": {
"gen-6": "body-style/bipedal-tailed-gen6.png"
}
},
{
"name": {
"eng": "Pokémon with a bipedal, tailless form",
"jpn": "尾を持たない2本脚のポケモン",
"jpn_ro": "O wo motanai nitai ashi no Pokémon"
},
"files": {
"gen-6": "body-style/bipedal-tailless-gen6.png"
}
},
{
"name": {
"eng": "Pokémon with a single pair of wings",
"jpn": "一対の翼を持つポケモン",
"jpn_ro": "Ittai no tsubasa wo motsu Pokémon"
},
"files": {
"gen-6": "body-style/wings-single-gen6.png"
}
},
{
"name": {
"eng": "Pokémon with serpentine bodies",
"jpn": "蛇型のポケモン",
"jpn_ro": "Hebikata no Pokémon"
},
"files": {
"gen-6": "body-style/serpentine-gen6.png"
}
},
{
"name": {
"eng": "Pokémon consisting of a head and arms",
"jpn": "頭と腕だけのポケモン",
"jpn_ro": "Atama to ude dake no Pokémon"
},
"files": {
"gen-6": "body-style/head-arms-gen6.png"
}
}
]
}

View File

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 333 B

View File

Before

Width:  |  Height:  |  Size: 349 B

After

Width:  |  Height:  |  Size: 349 B

View File

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 308 B

View File

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 329 B

View File

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 278 B

View File

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 262 B

View File

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 299 B

View File

Before

Width:  |  Height:  |  Size: 368 B

After

Width:  |  Height:  |  Size: 368 B

View File

Before

Width:  |  Height:  |  Size: 353 B

After

Width:  |  Height:  |  Size: 353 B

View File

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

View File

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 325 B

View File

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 361 B

View File

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 362 B

View File

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 370 B

View File

@@ -399,7 +399,7 @@ def generate_misc_table(misc, meta, curr_page, json_file, version = '[unknown]',
buffer.append('<tbody>')
# Ribbons
buffer.append('<tr><th></th><td colspan="8" class="group">%s</td></tr>' % groups['ribbon']['name']['eng'])
buffer.append('<tr><th></th><td colspan="6" class="group">%s</td></tr>' % groups['ribbon']['name']['eng'])
#buffer.append('<tr class="header"><th>#</th><th>Name</th><th>名前</th><th>Sprite</th><th>Origin</th><th colspan="2">Description/gen</th><th colspan="2">Filename/gen</th></tr>')
buffer.append('<tr class="header"><th>#</th><th>Name</th><th>名前</th><th>Sprite</th><th>Origin</th><th colspan="2">Filename/gen</th></tr>')
@@ -430,6 +430,27 @@ def generate_misc_table(misc, meta, curr_page, json_file, version = '[unknown]',
buffer.append('</tr>')
sprites_counter += 1
# Body styles
buffer.append('<tr><th></th><td colspan="6" class="group">%s</td></tr>' % groups['body-style']['name']['eng'])
buffer.append('<tr class="header"><th>#</th><th>Type</th><th>種類</th><th>Sprite</th><th colspan="4">Filename/gen</th></tr>')
for item in misc['body-style']:
count = get_counter()
name = item['name']
name_eng = name['eng']
name_jpn = name['jpn']
for k, v in item['files'].items():
gen_n = k.split('-')[1]
buffer.append('<tr class="variable-height">')
buffer.append(f'<td>{count}</td>')
buffer.append(f'<td>{name_eng}</td>')
buffer.append(f'<td>{name_jpn}</td>')
buffer.append('<td class="image item">' + get_img_node(get_misc_url(base_url, v), None, f"Sprite for '{name_eng}'", 'm') + '</td>')
buffer.append(f'<td class="filler" colspan="2"><code>{v}</code></td>')
buffer.append(f'<td>Gen {gen_n}</td>')
buffer.append('</tr>')
sprites_counter += 1
buffer.append('</tbody>')
buffer.append('<tfoot>')
buffer.append('<tr>')