use real sounds from kbsim
This commit is contained in:
+25
-5
@@ -1,23 +1,43 @@
|
||||
from typing import Literal
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Literal, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
SwitchType = Literal["cherry-mx-blue", "cherry-mx-red", "cherry-mx-brown"]
|
||||
SwitchType = Literal[
|
||||
"cream",
|
||||
"holypanda",
|
||||
"alpaca",
|
||||
"turquoise",
|
||||
"inkblack",
|
||||
"inkred",
|
||||
"mxblack",
|
||||
"mxbrown",
|
||||
"mxblue",
|
||||
"boxnavy",
|
||||
"buckling",
|
||||
"alpsblue",
|
||||
"topre",
|
||||
]
|
||||
|
||||
|
||||
class Marker(BaseModel):
|
||||
id: str
|
||||
time: float = Field(ge=0)
|
||||
key: str
|
||||
code: Optional[str] = None
|
||||
release_time: Optional[float] = Field(default=None, ge=0, alias="releaseTime")
|
||||
|
||||
model_config = {"populate_by_name": True}
|
||||
|
||||
|
||||
class Project(BaseModel):
|
||||
version: int = 1
|
||||
switch: SwitchType = "cherry-mx-blue"
|
||||
version: int = 2
|
||||
switch: SwitchType = "mxbrown"
|
||||
markers: list[Marker] = Field(default_factory=list)
|
||||
|
||||
|
||||
class ExportRequest(BaseModel):
|
||||
duration: float = Field(gt=0)
|
||||
switch: SwitchType = "cherry-mx-blue"
|
||||
switch: SwitchType = "mxbrown"
|
||||
markers: list[Marker] = Field(default_factory=list)
|
||||
|
||||
Reference in New Issue
Block a user