💄 Rendered 31-4 images
This commit is contained in:
parent
c7bbe9521d
commit
3dd2967dce
252 changed files with 303 additions and 0 deletions
25
data/render/31-4/render_all.py
Executable file
25
data/render/31-4/render_all.py
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python3
|
||||
# # -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
sys.path.append("../../convert/31-4")
|
||||
from db import *
|
||||
|
||||
db.bind(provider="sqlite", filename="../../clean/31-4/data.sqlite3")
|
||||
db.generate_mapping()
|
||||
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch()
|
||||
page = browser.new_page(device_scale_factor=3)
|
||||
with db_session:
|
||||
for m in [*Melee.select(), *Shield.select(), *Ranged.select()]:
|
||||
print(f"rendering {m.name}...")
|
||||
page.goto(f"http://localhost:8080/weapon/{m.name}")
|
||||
page.locator(".container").screenshot(path=f"./output/{m.name}.png")
|
||||
for o in Outfit.select():
|
||||
print(f"rendering {o.name}...")
|
||||
page.goto(f"http://localhost:8080/outfit/{o.name}")
|
||||
page.locator(".container").screenshot(path=f"./output/{o.name}.png")
|
||||
browser.close()
|
Loading…
Add table
Add a link
Reference in a new issue