ImageSort-Go is a command-line tool for sorting and renaming media files based on their EXIF metadata or by ascending index. It supports various image and video formats.
- Rename media files based on their EXIF creation date.
- Rename media files by ascending index.
- Supports a wide range of image and video formats, including
.jpg
,.png
,.mov
,.mp4
, and more.
-
Clone the repository:
git clone https://github.com/vin-rmdn/imagesort-go.git cd imagesort-go
-
Build the project:
go build -o imagesort_go
Sort and rename media files in a folder based on their EXIF creation date:
./imagesort_go sort-media /path/to/destination/folder
Rename media files in a folder by ascending index:
./imagesort_go rename /path/to/destination/folder
The supported file extensions are defined in config/config.go
. You can modify the RecognizedImageExtensions
variable to add or remove supported formats.
- Go 1.24 or later
To run the tests, use:
go test ./...
cmd/
: Contains the CLI commands.config/
: Configuration for supported file extensions.exif/
: Handles EXIF metadata extraction and date parsing.media/
: Media renaming logic.tool/
: Utility functions, such as safe renaming.testdata/
: Sample test files.
This project uses the following dependencies:
- go-exiftool: For extracting EXIF metadata.
- cobra: For building the CLI.
- testify: For testing.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to open issues or submit pull requests.
Special thanks to the authors of the libraries used in this project.