add km-hatch
This commit is contained in:
@@ -18,10 +18,14 @@ REPOS = [
|
||||
"url": "https://github.com/jondale/botbox3000.git",
|
||||
"branch": "main",
|
||||
"directory": "botbox3000",
|
||||
"inx_file": "boxbot.inx",
|
||||
"inx": [
|
||||
{
|
||||
"file": "boxbot.inx",
|
||||
"id": "org.knoxmakers.botbox",
|
||||
"submenu": ["Knox Makers", "Laser"],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "km-living-hinge",
|
||||
"url": "https://github.com/KnoxMakers/km-living-hinge.git",
|
||||
@@ -34,6 +38,12 @@ REPOS = [
|
||||
"branch": "main",
|
||||
"directory": "km-plot",
|
||||
},
|
||||
{
|
||||
"name": "km-hatch",
|
||||
"url": "https://git.knoxmakers.org/KnoxMakers/km-hatch.git",
|
||||
"branch": "main",
|
||||
"directory": "km-hatch",
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@@ -176,12 +186,16 @@ def patch_inx(inx_path: Path, extension_id: str | None, submenus: list[str] | No
|
||||
|
||||
|
||||
def process_repo(repo: dict, ext_dir: Path) -> None:
|
||||
inx_file = repo.get("inx_file")
|
||||
extension_id = repo.get("id")
|
||||
submenus = repo.get("submenu")
|
||||
inx_list = repo.get("inx", [])
|
||||
directory = repo["directory"]
|
||||
|
||||
for inx_config in inx_list:
|
||||
inx_file = inx_config.get("file")
|
||||
extension_id = inx_config.get("id")
|
||||
submenus = inx_config.get("submenu")
|
||||
|
||||
if inx_file and (extension_id or submenus):
|
||||
inx_path = ext_dir / repo["directory"] / inx_file
|
||||
inx_path = ext_dir / directory / inx_file
|
||||
patch_inx(inx_path, extension_id, submenus)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user