sindresorhus/opn

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Support passing string data and a type to open in the default application. #339

cfjedimaster posted onGitHub

The open-cli tool lets you pass an HTML string to open it in the default browser. I'd like to see that in open as well. Use case: I'm hitting an API that returns 4 image URLs. I'd love to build a quick HTML string that shows all 4 options, pass that to open, and it open in my browser.

I could workaround this for now by saving to a temp file and deleting after.


We could potentially introduce a new openHtml() import.

posted by sindresorhus about 1 year ago

I was thinking HTML, but it could be useful for other stuff too - like maybe I'm streaming an image from a remote source and want to pass it to open (I'd expect to have to clue it to the file type).

posted by cfjedimaster about 1 year ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests