Image Downloader

Version Documentation Maintenance License: MIT Twitter: ebukaume



Problem Statement

Imagine you are employed at a hypothetical company called “The Big Picture Corp” where the product department is requesting a tool to download a list of images from a plain text file. For now, there are not many requirements from the product yet and you only know that they want a simple command line tool for downloading images from a list of URLs and storing them on the local hard drive. From the product vision however, it’s already clear that having the functionality of batch-downloading images will be important to the product and is likely to be used in several different contexts.

Technologies

  • Node.js v16+
  • Nvm (optional)

Usage

Clone the repository to your local machine

$ git clone https://github.com/ebukaume/cli-batch-image-downloader.git

cd into the project directory, install dependencies, build and start

$ cd cli-batch-image-downloader
$ nvm install <or use whichever means you manage your node version>
$ npm install
$ npm run build
$ npm start -- [input file] [options]

Example

npm start -- test.txt -o result -c 1 -p img

Command-line Options

-o or --output  Output directory. NB: If this is not provided, images will be saved in [images] folder
-c or --concurrency  Number of concurrent downloads. NB: if concurrency is not provided, the script will default to 1
-p or --prefix  Prefix to append to images downloaded

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

  1. Fork it (https://github.com/ebukaumecli-batch-image-downloader.git/fork)
  2. Create your working branch (git checkout -b [choose-a-name])
  3. Commit your changes (git commit -am 'what this commit will fix/add/improve')
  4. Push to the branch (git push origin [chosen-name])
  5. Create a new Pull Request

Show your support

Give a ⭐️ if you like this project!

License

This project is licensed under the MIT License - see the LICENSE file for details

Contact me

Want to discuss this or other projects? Feel free to send me an email: ebukaume@gmail.com