This repo is for a CLI tool to convert Twemoji (Specifically Discord's fork) SVG
files to PNG
files. While there are PNG
assets included in the Twemoji repo, they are lower resolution (72px
). This tool allows for converting the SVG
files to any resolution. In addition, it can also get various details about each emoji. It is taking advantage of .NET's Native AOT deployment model, so it doesn't require the .NET runtime to be installed to run the tool.
A workflow is setup in this repo to convert the SVG
files to PNG
files (In 128px
, 256px
, and 512px
variants) on a weekly basis. You can get the artifacts from any of the jobs here.
- .NET 8 SDK
- You will also need to install the pre-requisites for your platform located here.
- For Linux based platforms, you primarily need to ensure that packages for
clang
andzlib
(dev) packages are installed to your system.
- For Linux based platforms, you primarily need to ensure that packages for
- You will also need to install the pre-requisites for your platform located here.
⚠️ Note:Before building, you need to know the "runtime identifier" for your platform. For simplicity, these docs will use
linux-x64
. Replace that value with what you use, if needed.For example if:
- You're building on a x64 Linux-based system, the identifier would be
linux-x64
.- You're building on an Apple-silicon macOS system, the identifier would be
osx-arm64
.
- Set your current directory to where you cloned the repo.
- Run the following command:
dotnet publish ./src/ConsoleApp/ --configuration "Release" --output "./build/" --runtime "linux-x64" --self-contained
The compiled binary will be located in the ./build/
directory in the local repo.
- Open the command palette (
Shift+Ctrl+P
(Windows/Linux) /Shift+Cmd+P
(macOS)). - Type in Tasks: Run Task and press
Enter
.- Ensure that is the selected option before pressing
Enter
.
- Ensure that is the selected option before pressing
- Select Publish: ConsoleApp.
- Select your platform's runtime identifier.
The compiled binary will be located in the ./build/
directory in the local repo.
Magick.NET
- This uses ImageMagick.
System.CommandLine
discord/twemoji
- Indirectly used.
The source code for this project is licensed with the MIT License.