Skip to content

sof9816/icons-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icon Downloader

A web application that processes CSV files containing words and downloads relevant icons for each word. Built with Node.js and Express, deployed on Vercel.

Live Demo

Visit the live application at: https://icons-downloader.vercel.app/

Features

  • CSV file upload and processing
  • Automated icon search and download
  • Multithreaded processing using Worker Threads
  • Organized folder structure for downloaded icons
  • Automatic ZIP file creation
  • Progress tracking and error handling
  • Responsive web interface
  • Drag and drop file upload
  • Serverless deployment on Vercel

Prerequisites

  • Node.js (v14 or higher)
  • npm (v6 or higher)

Installation

  1. Clone the repository:
git clone <repository-url>
cd IconDownloader
  1. Install dependencies:
npm install
  1. For local development:
npm run dev

Deployment

This application is deployed on Vercel. To deploy your own instance:

  1. Install Vercel CLI:
npm install -g vercel
  1. Login to Vercel:
vercel login
  1. Deploy:
vercel

Usage

  1. Visit https://icons-downloader.vercel.app/ or your local development server
  2. Upload a CSV file containing words (one word per column)
  3. The application will:
    • Process the CSV file
    • Search for icons for each word
    • Download the first two icons found for each word
    • Organize icons in folders named after each word
    • Create a ZIP file containing all downloaded icons
  4. Download the ZIP file when processing is complete

Project Structure

IconDownloader/
├── api/
│   └── index.js        # Serverless API endpoint
├── public/
│   ├── index.html
│   ├── styles.css
│   ├── script.js
│   └── upload-icon.svg
├── worker.js
├── vercel.json         # Vercel configuration
├── package.json
└── README.md

API Endpoints

  • POST /api/upload: Accepts CSV file upload and returns download URL for the ZIP file
    • Request: multipart/form-data with 'file' field containing CSV
    • Response: JSON with download URL and processing statistics

Error Handling

The application includes comprehensive error handling for:

  • Invalid file types
  • Network issues during icon downloads
  • Processing errors
  • API rate limits

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the ISC License.