docs: add xceditor api tree and new resource docs
This commit is contained in:
32
docs/api/_tools/scaffold_xceditor_layout.py
Normal file
32
docs/api/_tools/scaffold_xceditor_layout.py
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import runpy
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
SCRIPT_DIR = Path(__file__).resolve().parent
|
||||
IMPLEMENTATION = SCRIPT_DIR / "scaffold_parallel_layout.py"
|
||||
REPO_ROOT = SCRIPT_DIR.parents[2]
|
||||
XCEDITOR_INCLUDE_ROOT = REPO_ROOT / "new_editor" / "include" / "XCEditor"
|
||||
|
||||
|
||||
def main() -> int:
|
||||
old_argv = sys.argv
|
||||
sys.argv = [
|
||||
str(IMPLEMENTATION),
|
||||
"--root-name",
|
||||
"XCEditor",
|
||||
"--include-root",
|
||||
str(XCEDITOR_INCLUDE_ROOT),
|
||||
]
|
||||
try:
|
||||
module_globals = runpy.run_path(str(IMPLEMENTATION))
|
||||
return int(module_globals["main"]())
|
||||
finally:
|
||||
sys.argv = old_argv
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user