#!/usr/bin/env python3
"""
lucide2img — fetch an icon from lucide.dev and render it as a square avatar image.

Examples
--------
    python lucide2img.py camera
    python lucide2img.py github -r 1024 --bg "#0d1117" --fg white -f webp
    python lucide2img.py heart --bg "#ffe4e6" --fg "#e11d48" --radius 0.5 -o me.png
    python lucide2img.py rocket --bg transparent        # transparent PNG

Icon names use lucide's kebab-case (e.g. "arrow-right"); "Arrow Right" and
"arrow_right" are normalized automatically. Browse names at
https://lucide.dev/icons. Note that brand logos (e.g. github) were split out
of Lucide's core set -- use simpleicons2img.py for those.

Requires: cairosvg + pillow  (only for raster output; svg output needs neither).
"""

from icon2img import IconSource, run

LUCIDE = IconSource(
    key="lucide",
    prog_name="lucide2img",
    description="Fetch a lucide.dev icon and render it as a square avatar image.",
    url_template=(
        "https://raw.githubusercontent.com/lucide-icons/lucide/main/icons/{name}.svg"
    ),
    render_mode="stroke",
    browse_url="https://lucide.dev/icons",
    icon_arg_help="lucide icon name, e.g. 'camera' or 'arrow-right'",
    slug_style="kebab",
    default_stroke_width=2.0,
    not_found_hint="check the spelling",
)

if __name__ == "__main__":
    run(LUCIDE)
