tgs2json is a quick and effective command-line tool for converting Telegram .tgs sticker files into .json format quickly and easily.
Make sure you have Node.js installed on your system. You can download it from nodejs.org.
To install globally, run:
npm i tgs2json -gAlternatively, you can clone this repository and set it up locally:
git clone https://github.com/nullhq/tgs2json.git
cd tgs2jsonTo make the script globally executable, run:
npm install -gTo convert a single .tgs file to .json, use:
tgs2json your_file.tgsTo convert all .tgs files in the current folder, use:
tgs2json *You can specify an output folder for the .json files using the -o option:
tgs2json -o output_folder your_file.tgsor:
tgs2json -o output_folder *If the folder doesn’t exist, it'll be created automatically.
Suppose you've a file example.tgs in your current directory and want to convert it to a .json file in an output folder:
tgs2json -o output example.tgsTo convert all .tgs files in the current directory and place the .json files in the output folder:
tgs2json -o output *This project uses the following module:
pako: For decompressing.tgsfiles.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to contribute or report any issues! 🛠️