This project is an image downloader written in Go. It reads an Excel spreadsheet and downloads the listed images, saving them into an output folder specified by the user.
- Go (version 1.13+ is recommended)
- Library: github.com/xuri/excelize/v2
-
Compile the project:
For Linux and macOS:
go build -o img-downloader
For Windows:
go build -o img-downloader.exe
-
Run the binary:
./img-downloader
-
Follow the terminal instructions:
- Enter the output folder name.
- Enter the Excel file name (with extension) that contains the URLs.
The spreadsheet should have one URL per line. For example:
URL 1
URL 2
URL 3
You can generate binaries for different platforms using the environment variables GOOS and GOARCH:
-
To compile for Windows (on non-Windows systems):
GOOS=windows go build -o img-downloader.exe
-
To compile for Linux:
GOOS=linux go build -o img-downloader
-
To compile for a different architecture (example: PowerPC on Linux):
GOOS=linux GOARCH=ppc64 go build -o img-downloader
Use filename suffixes (for example, _windows or _unix) to organize platform-specific implementations if needed. Refer to the official Go documentation for more details on possible combinations by running:
go tool dist list- main.go: Main logic for reading the Excel file and downloading images.
- README.md: Project documentation.
MIT