Telegram sticker management tool
Project description
tsticker
📘 Overview
tsticker is a command-line interface (CLI) tool designed to streamline the creation and management of Telegram
stickers. It automatically adjusts image sizes and suggests appropriate emojis based on image names. The tool supports
both static and animated stickers (in webm format).
Just by adding or deleting files, you can easily update the contents of your sticker pack - making it incredibly user-friendly!
✨ Key Features
- Emoji Suggestions: Automatically suggests emojis based on image names, enhancing user experience.
- Automatic Image Adjustment: Resizes and adjusts images to meet Telegram's sticker requirements.
- Support for Multiple Sticker Types: Manages both static and animated stickers seamlessly.
- git-like Operations: Follows a workflow similar to Git with
init,sync, andpushcommands. - Support Gif Conversion: No problem with transparent background GIF conversion.
📋 Prerequisites
Ensure the following dependencies are installed before using tsticker:
| Dependency | Installation Link |
|---|---|
| ffmpeg | Download ffmpeg |
🛠️ Installation
Installing Dependencies
Install necessary dependencies based on your operating system:
You need install ImageMagick before using this CLI.
Install Guide: https://docs.wand-py.org/en/0.6.12/guide/install.html
Installing tsticker
The recommended way to install tsticker is through pipx for isolated environments:
pipx install tsticker
If pipx is not installed, install it with the following commands:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
If you want to upgrade tsticker to the latest version, use the following command:
pipx upgrade tsticker
🔑 Bot Token Setup
To create and manage stickers with tsticker, you need a Telegram Bot Token. Follow these steps:
- Open Telegram and search for the BotFather bot.
- Start a conversation with BotFather and send the command
/newbot. - Follow the instructions to create your bot and acquire the bot token.
The bot token provided by BotFather will be used as your BotToken.
We use https://pypi.org/project/keyring/ to manage your tokens, which may require additional steps. If you encounter problems, refer to: https://github.com/jaraco/keyring
🚀 Usage
Initial Setup
Log in to your Telegram account:
tsticker login -t <token> -u <user>
Replace <token> with your Telegram bot token and <user> with your Telegram user ID (you can get your user ID
from getidsbot).
Main Commands
| Command | Description |
|---|---|
tsticker init |
Initializes a new sticker pack. |
tsticker sync |
Syncs the sticker pack from your local directory with changes from the cloud. |
tsticker push |
Pushes changes from your local directory to the cloud, updating existing stickers. |
Example usage:
mkdir <folder_name>
cd <folder_name>
tsticker init -n <pack_name> -t <pack_title>
<pack_name>: The desired directory name for your sticker pack.<pack_title>: The title for your sticker pack.
Adding or Removing Stickers
To manage your stickers, simply add or remove images or animated files (GIFs/WebMs) in <pack>/stickers directory. After
making changes, use the following command to synchronize with your Telegram sticker pack:
tsticker push
If you encounter any issues, please create a new Issue on our GitHub repository.
⚠️ Important Notes
| Note | Description |
|---|---|
| No Support for Tgs Stickers | tgs format is not supported for this cli. |
| Rate Limiting | Each request is throttled to 2 seconds to avoid being blocked by Telegram. |
| Limited Emoji Auto-Selection | Automatic emoji selection may not work optimally for all languages, primarily supported for English. check github@telegram_sticker_utils:telegram_sticker_utils/core/rules.json |
| Rate Limits | Avoid excessive uploads in a short period to prevent Telegram from throttling your bot's actions. |
| Security | Keep your bot token secure. Stickers can only be managed through your bot or the official @Stickers bot by the sticker pack creator. |
📄 License
tsticker is released under the MIT License. See LICENSE for more information.
🤝 Contributing
Contributions are welcome! If you want to contribute, please follow our Contributing Guide.
🙏 Acknowledgments
Special thanks to all contributors who have made tsticker better. For issues or feature requests, please use
the GitHub issue tracker.
Enhance your Telegram sticker creation process with tsticker and become part of our community striving to simplify
sticker management through the command line!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tsticker-0.1.14.tar.gz.
File metadata
- Download URL: tsticker-0.1.14.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.19.2 CPython/3.12.3 Linux/6.8.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e5e89d86d0a9c3d46f5984ed19fc95466c3784ea2832d0e403952460d97d54f
|
|
| MD5 |
31d1b061720d21a60121e472b2a4df80
|
|
| BLAKE2b-256 |
2fca6038beaf68e065e92d8c5c7829c3ecd130e7b886ecb9f6d78e3a643f8ef3
|
File details
Details for the file tsticker-0.1.14-py3-none-any.whl.
File metadata
- Download URL: tsticker-0.1.14-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.19.2 CPython/3.12.3 Linux/6.8.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f474324eb4d4e1530ae00c0409ad4951d85a9ae8c77591451d2e6284dbcfec69
|
|
| MD5 |
3965aaa0d208c13c6fbd51873a2ebabf
|
|
| BLAKE2b-256 |
e18de24232735a9db7154b390a8f47854027dabc558a5ba2c362f80804de4be8
|