Astroport.ONE/rooms/meteofrance.sh

31 lines
1.1 KiB
Bash
Raw Normal View History

2022-03-08 23:38:55 +01:00
#!/bin/bash
################################################################################
# Author: Fred (support@qo-op.com)
# Version: 0.1
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
################################################################################
ts=$(date -u +%s%N | cut -b1-13)
################################################################################
# Capture la photographie satellite de la France
2022-03-11 21:34:13 +01:00
# https://fr.sat24.com/image?type=visual5HDComplete&region=fr
2022-03-08 23:38:55 +01:00
2022-03-13 00:10:32 +01:00
mkdir -p ~/..zen/game/meteo.anim.eu
rm -f ~/..zen/game/meteo.anim.eu/meteo.png
curl -m 20 --output ~/..zen/game/meteo.anim.eu/meteo.png https://s.w-x.co/staticmaps/wu/wu/satir1200_cur/europ/animate.png
2022-03-08 23:38:55 +01:00
2022-03-13 00:10:32 +01:00
if [[ ! -f ~/..zen/game/meteo.anim.eu/meteo.png ]]; then
echo "Impossible de vous connecter au service meteo"
2022-03-08 23:38:55 +01:00
exit 1
else
2022-03-13 00:10:32 +01:00
echo "NEED HTML TEMPLATING"
echo "Mise à jour archive points meteo : $ts"
echo $ts > ~/..zen/game/meteo.anim.eu/.ts
IPFS=$(ipfs add -Rw ~/..zen/game/meteo.anim.eu/)
echo $IPFS > ~/..zen/game/meteo.anim.eu/.chain
2022-03-08 23:38:55 +01:00
2022-03-11 21:34:13 +01:00
2022-03-08 23:38:55 +01:00
fi