📜 ⬆️ ⬇️

Client for Habrastorage.org on Ruby

Hello to writers! image

On the recommendation of Habrahabr, many use the habrastorage.org service to host images. Yes, downloading many images through a web page can be convenient, but not very.

I use the Gyazo client and the practices described in this article for screenshots. You have to reload images for Habrastorad, and this sometimes pesters if there are a lot of pictures in the post.
')
There was an idea to modify the client Gyazo, to immediately send screenshots to Habrastoraj. And you know, everything turned out!

The result is a Ruby client, which can be downloaded here: https://github.com/korjik/habrastorage-ruby-client

It allows you to select an area of ​​the screen using imagemagick , and uploads screenshots to Habrastoraj. At the end, it opens your file in a new browser window. From my own experience I will say that it is very convenient. Of course, habrastorage also wraps the pictures in the img tag, but I am ready to sacrifice this by inserting an image URL through image .

For info, how does the apload of pictures thank you to ankh1989 and his article .

The most mysterious for me was the method of obtaining a key for Habrastorage. Why does not work otherwise, I do not understand, but the correct way is this:

There we can get our data for the work of the uploader.

If you have ideas, suggestions, modifications - you are welcome!

Have a good day!

Source: https://habr.com/ru/post/161631/


All Articles