/Word-Sticker-Bot

A Telegram bot which generates WordArt stickers from text and styles the user chooses.

Primary LanguageCSSMozilla Public License 2.0MPL-2.0

Word Sticker Bot

This Telegram bot stylizes any text sent by the user, and generates a sticker which is added to the user's individual sticker set.

How does it work? It converts the user's text message into an HTML string styled with various CSS elements according to the user's choice of fonts. The bot then converts the HTML string into a compressed PNG image via imgkit and PIL. The user will automatically receive the sticker generated from our bot, added to their individual sticker set.

Try it now!

Features

  1. /text prompts the user to enter text of at most 100 characters, and allows the user to select from around 30 fonts to create a sticker.
  2. /styles displays all available styles, which are categorized into Basic, Bold, Fancy, Handwritten, Wordart, and Decorative.
  3. /set_default sets the default style.
  4. /delete deletes a previously created sticker. The user can send the sticker they want to delete or its index in the pack.
  5. /help shows the help dialogue.

Getting Started Locally

  1. Create a Telegram bot and obtain an authentication token from @BotFather on Telegram.
  2. Install requirements from requirements.txt.
  3. Replace your API token with the token in the main() function.
  4. Run python bot.py.

Deployment

The bot has been deployed on Telegram, you can find it @WordStickerBot.

Built With

Authors

Team Ankrypt

  • Chaitanya Baranwal - CS Undergraduate, National University of Singapore (NUS) - Github: chaitanyabaranwal
  • Ong Yan Chun - CS Undergraduate, National University of Singapore (NUS) - Github: yaaanch
  • Liu Zechu - CS Undergraduate, National University of Singapore (NUS) - Github: LiuZechu

Acknowledgments

  • Free time and lack of sleep
  • This project was created during Hack&Roll 2019, a Hackathon organized by NUS Hackers.