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

26 lines
387 B
Bash
Raw Normal View History

2024-09-04 00:53:14 +02:00
#!/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)
2024-09-19 02:54:12 +02:00
dir_path=$SHIMMERING_ASSET_DIR/songs/raw/$name
mkdir -p $dir_path
cd $dir_path
http GET "$url" > temp
2024-10-04 17:42:17 +02:00
magick ./temp ./base.jpg
magick ./base.jpg -resize 256x256 ./base_256.jpg
rm temp
2024-09-04 00:53:14 +02:00
img2sixel ./base.jpg
cd $curr