add scripts.py

This commit is contained in:
onyx-and-iris 2022-11-07 20:21:50 +00:00
parent bc508f8982
commit a460c6aeb0
2 changed files with 26 additions and 4 deletions

View File

@ -27,7 +27,7 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
dsl = "examples.dsl.__main__:main"
midi = "examples.midi.__main__:main"
obs = "examples.obs.__main__:main"
observer = "examples.observer.__main__:main"
dsl = "scripts:ex_dsl"
midi = "scripts:ex_midi"
obs = "scripts:ex_obs"
observer = "scripts:ex_observer"

22
scripts.py Normal file
View File

@ -0,0 +1,22 @@
import subprocess
from pathlib import Path
def ex_dsl():
path = Path.cwd() / "examples" / "dsl" / "."
subprocess.run(["py", str(path)])
def ex_midi():
path = Path.cwd() / "examples" / "midi" / "."
subprocess.run(["py", str(path)])
def ex_obs():
path = Path.cwd() / "examples" / "obs" / "."
subprocess.run(["py", str(path)])
def ex_observer():
path = Path.cwd() / "examples" / "observer" / "."
subprocess.run(["py", str(path)])