mirror of
https://github.com/aclist/dztui.git
synced 2026-10-27 13:12:54 +01:00
feat: parse toml entrypoint
This commit is contained in:
1 parent
48cb062d90
commit
5776f4c49f
2 files changed
+17
-6
No files matched your search
@@ -0,0 +1,13 @@
|
||||
from pprint import pprint
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
|
||||
def get_entrypoint() -> None:
|
||||
p = root.joinpath("pyproject.toml")
|
||||
with open(p, "rb") as f:
|
||||
t = tomllib.load(f)
|
||||
|
||||
name = t["project"]["name"]
|
||||
return t["project"]["scripts"][name]
|
||||
Reference in new issue
Block a user