present icon indicating copy to clipboard operation
present copied to clipboard

Download images from urls

Open vinayak-mehta opened this issue 5 years ago • 6 comments
trafficstars

vinayak-mehta avatar Aug 18 '20 23:08 vinayak-mehta

Hello, can I take over this one?

mrbasel avatar Aug 30 '20 17:08 mrbasel

Yes!

The idea I had for this was to (1) show the user a download progress of each image as its being downloaded (if the image is specified as a url in markdown), and (2) save the images in an images folder in the current directory. (3) The images folder acts like a cache so that the same images aren't download the next time present is invoked, unless the url / image alt has changed.

vinayak-mehta avatar Aug 30 '20 17:08 vinayak-mehta

Hi @vinayak-mehta,

Do you mind if I use an external library for the progress bar? Also should I create a helpers.py file to store image downloader function in?

mrbasel avatar Sep 01 '20 17:09 mrbasel

An external library should be good. Which one are you planning to use?

vinayak-mehta avatar Sep 02 '20 10:09 vinayak-mehta

You could also just use click's progress bar utility.

vinayak-mehta avatar Sep 02 '20 10:09 vinayak-mehta

Oh yeah, I think I will use click.

mrbasel avatar Sep 02 '20 13:09 mrbasel