Add chart loading management
This commit is contained in:
parent
3135dbe378
commit
5d2546ad60
3 changed files with 97 additions and 38 deletions
|
@ -58,14 +58,17 @@ def _save_json(path: Path, data: List[Dict]) -> None:
|
|||
|
||||
|
||||
def _copy_icons() -> None:
|
||||
"""Copy vendored icons to the output directory."""
|
||||
"""Copy vendored icons and scripts to the output directory."""
|
||||
src_dir = Path("static/icons")
|
||||
dst_dir = OUTPUT_DIR / "icons"
|
||||
if not src_dir.is_dir():
|
||||
return
|
||||
dst_dir.mkdir(parents=True, exist_ok=True)
|
||||
for icon in src_dir.glob("*.svg"):
|
||||
shutil.copy(icon, dst_dir / icon.name)
|
||||
if src_dir.is_dir():
|
||||
dst_dir.mkdir(parents=True, exist_ok=True)
|
||||
for icon in src_dir.glob("*.svg"):
|
||||
shutil.copy(icon, dst_dir / icon.name)
|
||||
|
||||
js_src = Path("static/chartManager.js")
|
||||
if js_src.is_file():
|
||||
shutil.copy(js_src, OUTPUT_DIR / js_src.name)
|
||||
|
||||
|
||||
def _render_snippet(report: Dict, out_dir: Path) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue