From a460c6aeb0ab8509d7c399a5b187fa46af389b76 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Mon, 7 Nov 2022 20:21:50 +0000 Subject: [PATCH] add scripts.py --- pyproject.toml | 8 ++++---- scripts.py | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 scripts.py diff --git a/pyproject.toml b/pyproject.toml index c39f696..6aca416 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" \ No newline at end of file +dsl = "scripts:ex_dsl" +midi = "scripts:ex_midi" +obs = "scripts:ex_obs" +observer = "scripts:ex_observer" diff --git a/scripts.py b/scripts.py new file mode 100644 index 0000000..afb925e --- /dev/null +++ b/scripts.py @@ -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)])