mirror of
https://github.com/yuruotong1/autoMate.git
synced 2025-12-26 13:52:31 +08:00
18 lines
439 B
Python
18 lines
439 B
Python
import subprocess
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
from actions.action_base import ActionBase
|
|
|
|
|
|
class OpenApplicationInput(BaseModel):
|
|
path: str = Field(description="要查询的关键词", title="应用路径", default="")
|
|
|
|
|
|
class OpenApplicationAction(ActionBase):
|
|
name = "打开应用"
|
|
description = "打开指定目录的应用"
|
|
args: OpenApplicationInput
|
|
|
|
def run(self, path):
|
|
subprocess.Popen(path) |