INNER CODE UNIT · Python

main

mtkennerly/ludusavi · scripts/generate-macos-icon.py:24

def main() -> None:
    args = parse_args()

    if shutil.which("rsvg-convert") is None:
        sys.exit("rsvg-convert is required; install librsvg before generating the macOS icon")

    try:
        from PIL import Image
    except ImportError:
        sys.exit("Pillow is required; install it with: python3 -m pip install pillow")

    args.output.parent.mkdir(parents=True, exist_ok=True)
    with tempfile.TemporaryDirectory() as temp_dir:
        raster = Path(temp_dir) / "icon.png"
        subprocess.run(
            [
                "rsvg-convert",
                "--width",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…