docs: Add comprehensive README.md for Gonamer project

This commit is contained in:
Steve White 2025-01-28 11:22:21 -06:00
commit 23bb7f3654
1 changed files with 67 additions and 0 deletions

67
README.md Normal file
View File

@ -0,0 +1,67 @@
# Gonamer
Gonamer is a command-line tool written in Go that uses OpenAI's vision model to intelligently rename image files based on their content. It analyzes images and suggests descriptive, meaningful filenames that reflect what's in the image.
## Features
- Uses OpenAI's vision model to analyze image content
- Supports JPG, JPEG, PNG, and GIF formats
- Generates unique, descriptive filenames
- Handles filename conflicts automatically
- Sanitizes filenames for cross-platform compatibility
- Configurable via YAML configuration file
## Installation
1. Ensure you have Go installed on your system
2. Clone this repository
3. Install dependencies:
```go
go get gopkg.in/yaml.v3
```
## Configuration
Create a configuration file at `~/.config/gonamer.yaml` with the following structure:
```yaml
apikey: "your-openai-api-key"
model: "gpt-4-vision-preview"
endpoint: "https://api.openai.com/v1/chat/completions"
temperature: 0.7
```
Make sure to replace `your-openai-api-key` with your actual OpenAI API key.
## Usage
```bash
go run gonamer.go <image_filename>
```
For example:
```bash
go run gonamer.go vacation_photo.jpg
```
The tool will:
1. Analyze the image using OpenAI's vision model
2. Generate a descriptive filename based on the image content
3. Sanitize the filename for compatibility
4. Rename the file while preserving the original extension
5. Handle any filename conflicts by adding a numeric suffix
## Error Handling
- Invalid file extensions will be rejected
- Network errors will be reported clearly
- Filename conflicts are resolved automatically
- Invalid characters in suggested filenames are sanitized
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is open source and available under the MIT License.