Skip to main content

Default template for PDM package

Project description

tsticker

PyPI version Downloads

📘 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!

intro

✨ 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, and push commands.

📋 Prerequisites

Ensure the following dependencies are installed before using tsticker:

Dependency Installation Link
ffmpeg Download ffmpeg
pngquant Download pngquant

🛠️ Installation

Installing Dependencies

Install necessary dependencies based on your operating system:

System Commands
Debian-based sudo apt install ffmpeg
sudo apt install pngquant
macOS brew install ffmpeg
brew install pngquant
Windows Download ffmpeg
Download pngquant
Ensure both dependencies are added to your system's PATH.
Arch Linux sudo pacman -S ffmpeg
sudo pacman -S pngquant

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

🔑 Bot Token Setup

To create and manage stickers with tsticker, you need a Telegram Bot Token. Follow these steps:

  1. Open Telegram and search for the BotFather bot.
  2. Start a conversation with BotFather and send the command /newbot.
  3. Follow the instructions to create your bot and acquire the bot token.

The bot token provided by BotFather will be used as your BotToken.

🚀 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 your local 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 Only webm format is supported for animated stickers.
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.
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tsticker-0.1.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tsticker-0.1.1-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file tsticker-0.1.1.tar.gz.

File metadata

  • Download URL: tsticker-0.1.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.16.1 CPython/3.10.12 Linux/6.5.0-1023-azure

File hashes

Hashes for tsticker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 10b2b07fce8b57c62c76681bf24a3834bca8ac8c3c1c8a0d1f07dc7b79922685
MD5 9ab4d70e3247263b226c42bc9c58fda3
BLAKE2b-256 1add4ae461984f74adee62b3f262735eda778a60b1d5b4878f8d536533d818c8

See more details on using hashes here.

File details

Details for the file tsticker-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: tsticker-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.16.1 CPython/3.10.12 Linux/6.5.0-1023-azure

File hashes

Hashes for tsticker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 338c8c0fb7b3dba2c3695ee7829f4fe1eb22d3e904cb3ecb8f4d87f5ff7d9d57
MD5 72fde70ab5dffc4ebb96292d32206d93
BLAKE2b-256 974113729fa8acf8b0f09a4579da425a885d6b859234ee6cf184f3ee3eccc8d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page