An open API service indexing awesome lists of open source software.

https://github.com/tsjdev-apps/piccaptionr

A simple .NET project that uses AI to generate engaging Instagram captions for your vacation photos.
https://github.com/tsjdev-apps/piccaptionr

Last synced: 5 months ago
JSON representation

A simple .NET project that uses AI to generate engaging Instagram captions for your vacation photos.

Awesome Lists containing this project

README

          

# ๐Ÿ“ธ PicCaptionr

```plaintext
____ _ ____ _ _
| _ \(_) ___ / ___|__ _ _ __ | |_(_) ___ _ __ _ __
| |_) | |/ __| | / _` | '_ \| __| |/ _ \| '_ \| '__|
| __/| | (__| |__| (_| | |_) | |_| | (_) | | | | |
|_| |_|\___|\____\__,_| .__/ \__|_|\___/|_| |_|_|
|_|
```

**AI-powered tool to automatically generate Instagram-style captions for your photos โ€“ on Windows, Linux and macOS.**

![Header](/docs/header.png)

[![Release](https://github.com/tsjdev-apps/piccaptionr/actions/workflows/release.yml/badge.svg)](https://github.com/tsjdev-apps/piccaptionr/actions/workflows/release.yml)

## โœจ Features

- ๐Ÿง  Uses OpenAI's Vision API to understand and describe your photos
- ๐ŸŒ Multilingual output (English, German, Spanish)
- ๐Ÿ—ž๏ธ Output as `.txt` file
- ๐Ÿ–ผ๏ธ Supports multiple images
- โš™๏ธ Flexible backend: OpenAI or Azure OpenAI
- ๐Ÿ’ป Available as:
- **Console App** (cross-platform)
- **WPF Desktop App** (Windows only)
- **Avalonia App** (modern cross-platform GUI for Windows, Linux & macOS)

## ๐Ÿš€ Getting Started

### ๐Ÿ”ง Requirements

- [.NET 10 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)
- An API key from [OpenAI](https://platform.openai.com) or your Azure OpenAI deployment

### ๐Ÿ–ฅ๏ธ Console App

```bash
cd PicCaptionr.ConsoleApp
dotnet run
```

You will be prompted to enter:

- your host (OpenAI / Azure OpenAI)
- your API key, Deployment name and Endpoint (depending on the host)
- the path to the folder containing the images
- target language
- optional additional instructions
- the path to an output folder

Output file (`.txt`) will be saved in the given directory

### ๐ŸชŸ WPF Desktop App

```bash
cd PicCaptionr.WPFApp
dotnet build
dotnet run
```

- Requires Windows and .NET Desktop Runtime
- Simple graphical interface with:
- Folder pickers
- Language and model selection
- Progress bar and log viewer

### ๐Ÿ–ผ๏ธ Avalonia App (Cross-platform GUI)

```bash
cd PicCaptionr.AvaloniaApp
dotnet build
dotnet run
```

- Works on Windows, Linux, and macOS
- Modern responsive UI using Avalonia UI
- Cross-platform folder picker and dynamic layout
- Provides the same functionality as the WPF app, but with platform-independent UI

> ๐Ÿ’ก **macOS Notice**: You may need to allow the app to run via terminal:
>
> ```bash
> chmod +x PicCaptionr.AvaloniaApp
> xattr -d com.apple.quarantine PicCaptionr.AvaloniaApp
> ```

## ๐Ÿ“ฆ CI/CD with GitHub Actions

All apps are built and published automatically via GitHub Actions:

### Build Workflows

- โœ… Console App (cross-platform):
- `win-x64`, `linux-x64`, `osx-x64`, `osx-arm64`
- โœ… WPF App (Windows only):
- `win-x64` (single `.exe`)
- โœ… Avalonia App (cross-platform):
- `win-x64`, `linux-x64`, `osx-x64`, `osx-arm64` (self-contained)

### Release Workflow

When a new version tag is pushed (`v*`), a GitHub release is automatically created with:

- Pre-compiled, self-contained binaries for all platforms
- Console App and WPF App as single executable files
- Avalonia App as complete self-contained packages

**Download releases**: Visit the [Releases](https://github.com/tsjdev-apps/piccaptionr/releases) page to get the latest builds for your platform.

## ๐Ÿ” Configuration

All variants require:

- An **API key** from OpenAI or Azure
- For Azure OpenAI:
- **Endpoint URL**
- **Deployment name**

Credentials are entered at runtime and never stored permanently.

## ๐Ÿ—‚๏ธ Folder Structure

```text
PicCaptionr.ConsoleApp # Console-based UI (cross-platform)
PicCaptionr.WPFApp # Windows-only WPF GUI
PicCaptionr.AvaloniaApp # Cross-platform GUI (Avalonia)
PicCaptionr # Shared models, services, and logic
```

## ๐Ÿ“ท Screenshots

### Console App

![Console](/docs/console-01.png)

![Console](/docs/console-02.png)

### WPF App

![WPF](/docs/wpf-01.png)

### Avalonia App

![Avalonia](/docs/avalonia-01.png)

## ๐Ÿ“„ Sample Output

![Sample Image](/docs/sample-image.jpg)

A typical output entry in JSON format might look like this:

```json
[
{
"ImageName": "tsjreiseblog_28-Jul-2025.jpg",
"ImageMetaData": {
"CaptureDate": null,
"Latitude": null,
"Longitude": null
},
"OpenAIResponse": {
"RawContent": "Exploring the charming streets and historic sights of Civitavecchia, Italy ๐Ÿ‡ฎ๐Ÿ‡นโœจ From vibrant scooters to stunning architecture and scenic harbor viewsโ€”every corner tells a story. Can't wait to see more of this beautiful port city! ๐Ÿšค๐Ÿ›๏ธ๐ŸŒŠ\n\n#Civitavecchia #ItalyTravel #PortCity #HistoricItaly #TravelItaly #ItalianArchitecture #HarborViews #ScooterLife #MediterraneanVibes #TravelDestinations",
"FormattedContent": "Exploring the charming streets and historic sights of Civitavecchia, Italy ๐Ÿ‡ฎ๐Ÿ‡นโœจ From vibrant scooters to stunning architecture and scenic harbor viewsโ€”every corner tells a story. Can't wait to see more of this beautiful port city! ๐Ÿšค๐Ÿ›๏ธ๐ŸŒŠ\r\n\r\n#Civitavecchia #ItalyTravel #PortCity #HistoricItaly #TravelItaly #ItalianArchitecture #HarborViews #ScooterLife #MediterraneanVibes #TravelDestinations",
"InputTokens": 800,
"OutputTokens": 94
}
}
]
```

## ๐Ÿ““ License

MIT License ยฉ [tsjdev-apps](https://github.com/tsjdev-apps)

## ๐Ÿ’ฌ Feedback & Contributions

Found a bug? Want to improve the UI?
Open an [Issue](https://github.com/tsjdev-apps/piccaptionr/issues) or submit a [Pull Request](https://github.com/tsjdev-apps/piccaptionr/pulls).
We โค๏ธ feedback and contributions!