Spaces:
Runtime error
Runtime error
Download src/export/bom.py from keinne/Pro_T_Transradial: direct link, hf CLI and curl.
- Browser
- Download file 411 Bytes
-
https://huggingface.co/spaces/keinne/Pro_T_Transradial/resolve/main/src/export/bom.py
- Command line
-
hf download hf://spaces/keinne/Pro_T_Transradial/src/export/bom.py
-
curl -L -o bom.py https://huggingface.co/spaces/keinne/Pro_T_Transradial/resolve/main/src/export/bom.py
411 Bytes
| import pandas as pd | |
| from pathlib import Path | |
| def make_bom(parts: dict, out_dir: Path): | |
| rows = [] | |
| for name in parts.keys(): | |
| rows.append({"part": name, "qty": 1, "notes": "printable"}) | |
| # exemplo de hardware padrão | |
| rows.append({"part": "Screw M3x10", "qty": 8, "notes": "steel"}) | |
| df = pd.DataFrame(rows) | |
| out_dir.mkdir(parents=True, exist_ok=True) | |
| fp = out_dir/"BOM.csv" | |
| df.to_csv(fp, index=False) | |
| return str(fp) |