1
0
manga/scpt/convert.zsh
2024-04-06 03:56:19 +09:00

22 lines
394 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/zsh
d=${0:a:h}
dd=${0:a:h:h}
url=manga.syui.ai
case $OSTYPE in
darwin*)
path_nvm_sh="/opt/homebrew/opt/nvm/nvm.sh";;
linux*)
path_nvm_sh="";;
esac
dir=$dd/public/manga
cd $dir
export NVM_DIR="$HOME/.nvm"
[ -s "$path_nvm_sh" ] && \. "$path_nvm_sh"
nvm use 17
nvm i squoosh-cli
squoosh-cli --webp '{"quality":100}' -d ./ --resize '{width:825,height:1080}' *.png
#1620×2160