tg-sticker-export icon indicating copy to clipboard operation
tg-sticker-export copied to clipboard

Exports all the stickers from a stickerpack to webp and png files (written in bash)

Telegram stickers export script

Download all your stickers into a local directory.

Amada Kokoro writing Japanese syllables

(from Amada Kokoro stickerpack)

Usage

./stick_export.sh <stickerpack name or URL>

Will download all stickers in the stickerset to a <stickername> dir, which contains two subdirs: webp and png, for respective file formats.

Be sure to insert your bot token (see below) before use.

In order to get the stickerpack URL, do the following (using TDesktop):

  1. Find the stickerset in your stickers panel
  2. Click on its name
  3. Click 'Share stickers'
  4. Paste the link as an argument to this script

Dependencies

  • bash or something compatible (zsh)
  • curl (for http requests)
  • ffmpeg (for convertation to png)
  • jq (!) (for json parsing)

Setup

You need to get a bot token. Go talk to https://t.me/BotFather, write /newbot and follow its instructions. Eventually you get a token. You can just wait for something scary to appear in the chat and that is a token.

TODO

  • [x] a nice README
  • [ ] settings to decide wether to convert stickers to png or leave in webp
  • [ ] a token checker which will tell the user if something's wrong with it
  • [ ] cli flags like help or to specify the output directory
  • [ ] make it quiet? and use a flag for verbosity
  • [your feature here]

Pull requests are welcome!

Authors

26000