2016-06-18 15:48:18 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# *NOTE* for first run, you have to do something like
|
|
|
|
#
|
|
|
|
# +---------------------------------------------+
|
|
|
|
# | ~ # touch /home/minetest/mapshots/daily.png |
|
|
|
|
# +---------------------------------------------+
|
|
|
|
#
|
|
|
|
# first.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2016-06-18 15:59:11 +02:00
|
|
|
mapperdir="/home/minetest/tools/minetestmapper"
|
|
|
|
cddir="/var/www/files/mapshots"
|
|
|
|
tiles="$cddir/tiles"
|
|
|
|
sourcedir="/var/minetest/illuna_world"
|
2016-06-18 15:48:18 +02:00
|
|
|
|
2016-06-18 15:59:11 +02:00
|
|
|
main="$cddir/daily.png"
|
|
|
|
klein="$cddir/daily_small.jpg"
|
|
|
|
tarfile="$cddir/daily.tar.bz2"
|
2016-06-18 15:48:18 +02:00
|
|
|
|
2016-06-18 15:59:11 +02:00
|
|
|
date=$(date "+%d-%m-%Y")
|
2016-06-18 15:48:18 +02:00
|
|
|
|
2016-06-18 15:59:11 +02:00
|
|
|
cd $cddir
|
|
|
|
cp -r $main $cddir/world_$DATE.png
|
|
|
|
rm -r $main
|
2016-06-18 15:48:18 +02:00
|
|
|
|
2016-06-18 15:59:11 +02:00
|
|
|
cd $mapperdir
|
|
|
|
./minetestmapper --geometry -10000:-5000+20000+20000 --bgcolor '#c7c7c7' --drawalpha --drawscale -i $sourcedir -o $main
|
2016-06-18 15:48:18 +02:00
|
|
|
|
2016-06-18 15:59:11 +02:00
|
|
|
cd $cddir
|
|
|
|
mogrify -resize 1000 -format jpg -quality 100 $main
|
2016-06-18 15:48:18 +02:00
|
|
|
mv daily.jpg daily_small.jpg
|
|
|
|
|
2016-06-18 15:59:11 +02:00
|
|
|
tar -cvjf $tarfile daily.png
|
|
|
|
|
|
|
|
python /home/minetest/tools/gdal2tiles-leaflet/gdal2tiles.py -l -p raster -z 0-10 -w none $main $tiles
|
|
|
|
|