theglasspenguin — 2/24/2023, 6:17:11 PM

ok, so for some irc bot i’m trying to make:

how would you convert html code to an image? sorta like https://www.npmjs.com/package/html-to-image but without a browser/dom (since it’s a bot, it has no browser)

♥ 1 ↩ 0 💬 2 comments

comments

jeffalo:

you might be able to patch that one with jsdom and a canvas implementation, but i doubt it would be great. i think people sometimes might use something like puppeteer and then take a screenshot of the page.

2/24/2023, 9:30:15 PM
cst1229:

you could basically embed a browser into the bot using a library like puppeteer

2/24/2023, 6:26:25 PM