-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I've redesigned the repository a bit and continue to explore github a…
…ction (^◔ᴥ◔^)
- Loading branch information
Showing
27 changed files
with
10,889 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 (≧◡≦) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Dockerfile | ||
README.md | ||
node_modules | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
Oops, something went wrong.