#matrix #sticker #chat #messaging #stickerpicker

app mstickereditor

import sticker packs from telegram, to be used at the Maunium sticker picker for Matrix

5 unstable releases

Uses new Rust 2021

0.3.0 Jul 16, 2022
0.2.0 Jul 8, 2022
0.1.3 Mar 21, 2022
0.1.2 Mar 18, 2022
0.1.1 Jan 28, 2022

#28 in #chat

Apache-2.0

29KB
729 lines

GitHub actions crates.io License Apache-2.0 AUR package more-wallpapers on deps.rs

mstickereditor

Import sticker packs from telegram, to be used at the Maunium sticker picker for Matrix

Features:

  • import Stickerpacks from Telegram (including animated Stickerspacks)
  • enable Stickerpicker widget for supported Matrix Clients

Client Support for Animated Sticker:

Client gif webp(default) custom stickerpicker
Element Desktop/Web
Element Android no autoplay static image only
Schildi Desktop/Web
Schildi Android static image only
Nheko
mautrix-telegram-bridge static image only -

Other clients were not tested. (I am not assioted with Schildi, although they also love turtles)

Gif does not support semitransparent pixel, which probably leads to ugly effects, if the background of the client does not match the transparent_color.

Requirements:

Dependencies:

Configuration:

You need to create the following config.toml file and enter your values:

[telegram]
bot_key = "YOUR-TELEGRAM-BOT-KEY"

[matrix]
user = "@user:matrix.org"
homeserver_url = "https://matrix-client.matrix.org"
access_token = "YOUR-MATIRX-ACESSTOKEN"

[sticker]
transparent_color = { r = 0, g = 0, b = 0, a = true }
animation_format = "webp"

The [sticker] section and every field inside are optional and can be left out.

transparent_color is used as color for semitransparent pixel in gifs. The field has no effect, if the sticker is not animated or will be converted to webp (default). r,g,b are 8-bit unsigned integer and must been between 0 and 255 inclusive.

Installation:

Current are no prebuild binaries available. You must build mstickereditor by yourself. See below.

For Arch Linux user or user of an Arch based distrubution an aur package is available.

Building:

Install the following packages. (I recommand to use the package managment system of your operating system):

To build and install mstickereditor execute the following command:

cargo install --locked mstickereditor

Check out rust doc for more information about cargo install.

Dependencies

~16MB
~338K SLoC