|
|
@@ -0,0 +1,15 @@ |
|
|
|
#!/bin/bash |
|
|
|
# alias vip='bash /home/root/vip.sh' |
|
|
|
# vip https://cdn.esahubble.org/archives/images/publicationjpg/heic1501a.jpg |
|
|
|
|
|
|
|
media_dir="/home/root/media/files/virages" |
|
|
|
fullname=$(basename -- "$1") |
|
|
|
name=$(basename -- "$fullname") |
|
|
|
name="${fullname%.*}" |
|
|
|
server_url="https://files.erudi.fr/virages" |
|
|
|
|
|
|
|
cd $media_dir |
|
|
|
wget $1 |
|
|
|
|
|
|
|
vips dzsave $fullname $name --layout=dz --tile-size=256 --overlap=0 |
|
|
|
# sed -i "s|\"@id\": \"https://example.com/iiif/${name}\"|\"@id\": \"${server_url}/${name}/\"|g" "${name}/info.json" |