Skip to content

Commit

Permalink
I've redesigned the repository a bit and continue to explore github a…
Browse files Browse the repository at this point in the history
…ction (^◔ᴥ◔^)
  • Loading branch information
Ducheved committed Mar 7, 2024
1 parent b23a102 commit 1f699e6
Show file tree
Hide file tree
Showing 27 changed files with 10,889 additions and 102 deletions.
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
server/.env
server/temp/
server/node_modules
server/package-lock.json
bot/.env
bot/temp/
bot/node_modules
bot/package-lock.json
frontend/node_modules
frontend/package-lock.json
frontend/.DS_Store
frontend/dist
frontend/.env.local
Expand Down Expand Up @@ -39,9 +36,6 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
.dockerignore
server/.dockerignore
frontend/.dockerignore
.env
.env
frontend/src/assets/g8.png
Expand Down
44 changes: 7 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,15 @@
# Cute.Converter Σ(°△°|||)︴
# Cute.Converter (^=◕ᴥ◕=^)
### Enjoy the chaos! Ideal for when you need fast and free image convert
| VERSION 0.0.2

| VERSION 0.0.12
![Cute.Converter Logo](https://s3.timeweb.cloud/20d1be9e-3ff922d8-1ca4-4144-be5a-07579a3f953e/github/cc.png)

This repository is a work in progress and does not contain a finished product. It is the foundation for a future image converter that currently works with the following endpoint:

```
http://localhost:33250/api/v1/images/process?format=png&optimize=true&resize={"height":220}&quality=20
```

You can use the following curl command to interact with the endpoint:

```bash
curl --location --globoff 'http://localhost:33250/api/v1/images/process?format=png&optimize=true&resize={%22height%22%3A220}&quality=20' \
--form 'image=@"/V:/test.webp"'
```

Here's a breakdown of the parameters:
Wanna see this in action? Hit up [cc.imeow.pro](http://cc.imeow.pro) for a demo.

- `format=png`: Specifies the output format of the image.
- `optimize=true`: Tells the server to optimize the image.
- `resize={%22height%22%3A220}`: Tells the server to resize the image to a height of 220 pixels. The width will be adjusted to maintain the aspect ratio.
- `quality=20`: Sets the quality of the output image to 20 (out of 100).
- `--form 'image=@"/V:/test.webp"'`: Specifies the form data to be sent. The `@` symbol tells curl to upload a file, and `"/V:/test.webp"` is the file path of the image to be processed.
## It's my learning space Σ(°△°|||)︴

## Current Functionality

The current implementation provides the following features:

- **File Type Validation**: Validates the incoming file to ensure it is an image. Currently supports 'png', 'jpg', 'jpeg', 'webp', 'tiff', and 'gif' formats.
- **Image Processing**: Uses the Sharp library to process the image. Can change the format, optimize, resize, and adjust the quality of the image based on the parameters provided in the request.
- **Metadata Generation**: Generates metadata for both the input and output images, including size, dimensions, format, and quality.

Please note that this is a work in progress and additional features will be added in the future.


## Author

This project is created by [Ducheved](https://github.com/Ducheved). For any issues, please report [here](https://github.com/Ducheved/Cute.Converter/issues).

## License

This project is licensed under the MIT License.

。・゚・(ノД`)ヽ( ̄ω ̄ )
You've just landed on my learning playground. Don't be surprised if you see a ton of commits that seem pointless (≧◡≦)
4 changes: 4 additions & 0 deletions bot/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Dockerfile
README.md
node_modules
npm-debug.log
15 changes: 8 additions & 7 deletions bot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM node:latest
FROM node:21.6.2-bookworm-slim
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
ENV BOT_TOKEN=YOUR_BOT_TOKEN
ENV API_SERVER=https://api-cc.imeow.pro
ENV BOT_PORT=41004
ENV BOT_ADDRESS=0.0.0.0
ENV USE_WEBHOOKS=TRUE
ENV WEBHOOK_URL=https://bot-cc.imeow.pro
ENV BOT_TOKEN=
ENV API_SERVER=
ENV API_PORT=
ENV BOT_PORT=
ENV BOT_ADDRESS=
ENV USE_WEBHOOKS=
ENV WEBHOOK_URL=
EXPOSE 41004
CMD [ "node", "app.js" ]
Loading

0 comments on commit 1f699e6

Please sign in to comment.