Image Downloader is a command-line tool that downloads images from a list of URLs provided in a plain text file. The tool parses the file, extracts the URLs, validates if the URLs point to an image, and downloads the images to a local directory. The tool also handles any invalid URLs and skips them without terminating the program.
- Ruby version 3.2.2
- concurrent-ruby
- pry
- rspec
- webmock
All dependencies can be installed via Bundler. If you don't have Bundler installed, you can install it with gem install bundler
. After that, you can install the dependencies with bundle install
.
- Clone this repository.
- Navigate to the project directory in the terminal.
- Install the dependencies with
bundle install
. - Run the program with
bin/downloader.rb
.
- Navigate to the project directory in the terminal.
- Run the tests with
bundle exec rspec
.
The project is organized into several directories:
bin/
: Contains the executable script that runs the program.lib/
: Contains the core classes of the application:UrlExtractor
andImageDownloader
.spec/
: Contains the test files for the application.