npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

multi-image-downloader

v1.0.2

Published

A fast and lightweight Node module for downloading images in bulk to local disk from an array of urls or url entries in a column of a .csv file.

Downloads

6

Readme

🧜‍♂️ Node Multiple Image Downloader

A fast and lightweight Node module for downloading images in bulk to local disk from an array of urls or url entries in a column of a .csv file.

🔱 Inspiration

While working on some image classification project with deep learning, we felt the lack of such a package which can download plenty of images from entries within a .csv file. 📂

📍 Hence, this downloader package was built and till date it supports two types of input ->

  1. raw array of image urls 🐛
  2. csv file with range of rows and column name specified. 🦋

Let's see how we can use this package to speed up our large image downloading phases.

🔱 Installation

npm install --save multi-image-downloader

🔱 Options

| Parameter | Requirement | Default Value | Example | |----------|----------|----------|----------| | urls | Required, if csv not provided | [ ] | [ 'https://image1.jpg', 'https://image2.jpg', ... ] | | targetFolder | Optional | './downloads' | './any/folder' | | csv | Required, if urls not provided | "" | 'data.csv' | | startRow | Optional | 1 | 5 | | endRow | Optional | -1 | 1000 | | columnName | Optional | "" | "image_urls" |

🔱 Usage

Let's see how to build the options two use cases with examples ->

⚡ Raw url array

const urls = [
    "https://example.org/image1.jpg",
    "https://example.org/image2.jpg",
    "https://example.org/image3.jpg",
    "https://example.org/image4.jpg",
    .
    .
    .
]

const options = {
    urls,
    targetFolder: './any/folder' // optional
}

💥 With a CSV file

const csv = 'data.csv' // an available csv file address
const options = {
    csv,
    startRow: 10, 
    columnName: 1000,
    targetFolder: './any/folder', // optional
}

Now we will see how we use this option we just built in other projects.

const multiImageDownloader = require('multi-image-downloader');

// set up options as shown above

multiImageDownloader(options)

This will start downloading valid images in the targetFolder specified.

💰 After successful downloading of all the images, it will log

All images downloaded!

in the console.

Yeayy! We have successfully downloaded all our images and saved a lot of time! ⌛

Hope you enjoyed this journey. See ya in another doc of some other package! Have a nice day! 🌞