logoalt Hacker News

latexryesterday at 1:20 PM2 repliesview on HN

Yeah, but then I’d have to be working with Python (which I don’t enjoy) and be pulling in dependencies (which I avoid) to have a custom system with moving parts (Python interpreter, library, script) (which I don’t want).

A rust CLI would make a lot of sense here. Single binary.


Replies

sorenjanyesterday at 5:33 PM

  > uvx --with pillow --with okmain python -c "from PIL import Image; import okmain; print(okmain.colors(Image.open('bluemarble.jpg')))"
  [RGB(r=79, g=87, b=120), RGB(r=27, g=33, b=66), RGB(r=152, g=155, b=175), RGB(r=0, g=0, b=0)]
It would make sense to add an entrypoint in the pyproject.toml so you can use uvx okmain directly.
blipvertyesterday at 1:42 PM

This sounds like a job for <ta-ta-ta-taaaa> contrib-directory-man!

show 1 reply