Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 703 Bytes

readme.md

File metadata and controls

30 lines (25 loc) · 703 Bytes

Batch Image Downloader

Batch download images from JSON files using NodeJS.

Usage

  1. Get started by cloning or downloading this repository.
  2. Create a data.json file within the projects root directory.
  3. Open the index.js file
  4. Modify the variables within the //Editable Content comments
  5. Run the download command npm run download

Demo of data.json

{
  "${your-picture-name}": "${your-picture-link}",
}

Demo of editable code

const getDownloadItem = (key) => {
    return {
        productImage: data[key],
        productId: key
    }
}
const downloadArray = Object.keys(data).map(getDownloadItem);
const totalDownloads = downloadArray.length;