howdoi icon indicating copy to clipboard operation
howdoi copied to clipboard

Add terminal support for images

Open V2dha opened this issue 3 years ago • 3 comments

Description

Some of the answers returned from the query contains image links in them like the one mentioned below.

Capture

The quality of the answer can be improved if there is a way to incorporate the image URLs in the answers by adding a terminal support for images or if not possible opening the image URLs identified on the browser locally.

Additional Comments (if any)

This is the original StackOverflow answer from where the answer snippet was extracted with the image.

Capture

Have you read the Contributing Guidelines on Pull Requests on mkdocs?

Yes

V2dha avatar Oct 18 '21 15:10 V2dha

Hi , Can you elabortae a little bit more on this ? I would like to work on this issue. I like the idea of using browser to show the pictures , But i think we should ask confirmation from the end-user to avoid this feature possibly being misused. We can use regex to find the links and make a function using webbrowser module to open the links.

SepehrRasouli avatar Mar 01 '22 14:03 SepehrRasouli

Yes I like the idea, but in practice it sounds a little sketchy. The whole reason I made howdoi was to stay out of the browser. If you really need an image you can get the link with -l and pipe to xargs open to get in the browser.

howdoi open wsl folder in windows -l | xargs open

gleitz avatar Mar 05 '22 00:03 gleitz

I agree with the misuse part. So as an alternative what if we could fetch the alt text specified in the image tag? It would at least give a description of the image. Although I don't think most of the time while uploading an image the alt attribute is filled in.

V2dha avatar Jun 14 '22 18:06 V2dha