Skip to content

Commit

Permalink
update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ElinaZoldnere committed Jul 5, 2024
1 parent 0c4d818 commit ade1321
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# discord-bot
A bot for my private community server in Discord
# Discord Bot (App) for HEIC Image Conversion
This repository contains a Discord App designed for automated conversion of HEIC format image files
to JPEG images within Discord text channels.

## Overview

On Discord, HEIC files are treated as regular files rather than images, which prevents them from
being previewed and embedded in the text like other image formats. This can be inconvenient and
disturbing, so I developed a custom solution to enhance the user experience.

In this implementation, when a HEIC format attachment is uploaded in a text channel, the app
converts it to a JPEG image. The bot then posts the converted image in the same text channel.

The project is developed with Java Spring Boot and built with Gradle.
The image conversion service is separated from the app, developed as a Google Cloud Function written
in Python with Flask and using the Pillow framework for image processing. It communicates with the
app through HTTP requests.

## Project Structure

- `.github/workflows/`: Contains GitHub Actions workflows for continuous integration.
- `cloud-function/`: Contains the Google Cloud Function script and its dependencies.
- `main.py`: The Cloud Function script.
- `requirements.txt`: The dependencies required for the Cloud Function.
- `src/`: Contains the Java source code.
- `build.gradle`: The Gradle build file.
- `settings.gradle`: The Gradle settings file.

## Environment Variables
Sensitive data for the project is specified as environment variables. In the Google Cloud Function,
they are set directly during initial deployment. In the Spring Boot application, they are loaded
from a `.env` file. The `application.properties` file contains the loading configuration and
variable placeholders for reference.

0 comments on commit ade1321

Please sign in to comment.