ed-asriyan / lottie-converter

Converts Lottie Animations (.json / .lottie) and Telegram stickers (*.tgs) to GIF / PNG / APNG / WEBP / WEBM
https://t.me/tgtowabot
MIT License
795 stars 72 forks source link

Windows documentation: how to convert all files in all subdirectories #70

Closed Meteor0id closed 1 year ago

Meteor0id commented 2 years ago

Make sure you have installed node.js and unpacked gifski and C:\gifski-1.7.0\win is listed in your path in system-variables. If you have to add it to your path you have to reopen cmd for it to take effect.

Create a .bat file with the following code (change the paths to you needs) REM chcp 65001 allows handling directories and files with unusual non-ascII chars chcp 65001 for /f "usebackq delims=|" %%f in (dir /b /s "C:\All stickerpacks**.tgs") do node "C:\tgs-to-gif-master\cli.js" "%%f" pause

if you use nvm to install node.js you may also have to install lottie

ed-asriyan commented 1 year ago

the tool has been rewritten by scratch

please use docker version which supports batch converting or build from sources then use bash for example

find $PATH_TO_DIRECTORY_WITH_STICKERS -name '*.tgs' | while IFS=$'\n' read -r FILE; do 
  ./bin/tgs_to_gif.sh $FILE
done