Find the Inkscape executable.
()
| 154 | |
| 155 | |
| 156 | def find_inkscape() -> str: |
| 157 | """Find the Inkscape executable.""" |
| 158 | inkscape = shutil.which("inkscape") |
| 159 | if inkscape: |
| 160 | return inkscape |
| 161 | # Common Windows install path |
| 162 | candidate = Path(r"C:\Program Files\Inkscape\bin\inkscape.exe") |
| 163 | if candidate.exists(): |
| 164 | return str(candidate) |
| 165 | print("Error: Inkscape not found. Please install it or add it to PATH.", file=sys.stderr) |
| 166 | sys.exit(1) |
| 167 | |
| 168 | |
| 169 | def render_svg(inkscape: str, svg: Path, output: Path, width: int, height: int): |
no outgoing calls
no test coverage detected