26 lines
517 B
Python
26 lines
517 B
Python
import asyncio
|
|
import json
|
|
import os
|
|
from dataclasses import asdict
|
|
|
|
from hpoi.models.figure import Figure
|
|
|
|
|
|
async def generate_test_data_figures():
|
|
data = {
|
|
"figures": [
|
|
asdict(await Figure.from_hpoi_id(hpoi_id)) for hpoi_id in [74499, 61735]
|
|
]
|
|
}
|
|
|
|
json.dump(
|
|
data,
|
|
open(os.path.join(os.path.dirname(__file__), "figures.json"), "w"),
|
|
indent=4,
|
|
ensure_ascii=False,
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(generate_test_data_figures())
|