khrome / ascii-art

A Node.js library for ansi codes, figlet fonts, ascii art and other ASCII graphics
MIT License
681 stars 287 forks source link

[feature request] Support for remote image urls #6

Open vsmart opened 6 years ago

vsmart commented 6 years ago

Hi @khrome,

thanks for this great library! ✨

It would be great if the image api would support accepting remote urls additionally to local filepaths.

Cheers @vsmart

khrome commented 6 years ago

Sorry, for the late reply... but I'm considering implementing this. Is this the library (node&browser) or on the command-line?

khrome commented 3 years ago

This will be coming in the next release, but it will require either setting some path vars or some config options to point it at the right library. (request, axios and fetch will be one-liners). Additionally, all plugins will share this lib which uses the same interface internally regardless of what implementation is used.

khrome commented 3 years ago

This is now supported on the new CLI ( ascii-art-cl ) or if you call setRequest() on the root export or on Artwork or Image directly, using a request signature compatible library (like request, postman-request, fetch-as-request, request-as-request and more).

This means it's not enabled by default (except on command line) and thus has no security implications when included in your own libs.