1
Fork 0
shimmeringmoon/scripts/import-jacket.sh

26 lines
382 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -p libsixel
#!nix-shell -i bash
if [ "$#" != 2 ]; then
echo "Usage: $0 <name> <url>"
exit 1
fi
name=$1
url=$2
curr=$(pwd)
dir_path=$SHIMMERING_ASSET_DIR/songs/$name
mkdir $dir_path
cd $dir_path
http GET "$url" > temp
convert ./temp ./base.jpg
convert ./base.jpg -resize 256x256 ./base_256.jpg
rm temp
img2sixel ./base.jpg
cd $curr