Hacker News new | ask | show | jobs
by vgalin 807 days ago
(Disclaimer, I'm the maintainer of this package, but this kind of use is exactly why I created it at the beginning)

If you know how to use HTML+CSS and would like to generate full-fledged cards, you could use a package such as html2image [0] to combine the text, the image and a card-template image into one final image. Chrome/Chromium has to be available on Colab Notebooks though, that's the only requirement. Using basic SVG without this package could also do the trick.

[0] https://github.com/vgalin/html2image

1 comments

I had worked on a similar package for similar reasons but yes, Chromium is too big of a dependency.

I have an idea for a non-Chromium implementation but that’s a rabbit hole.

Since you’re already in Python, perhaps my `skit` package could be of service? https://pypi.org/project/skit-game/

It depends on Python and Pillow.