edit: ajout du spaceapi

This commit is contained in:
2026-08-24 03:29:49 +02:00
parent 00b4c3e9bd
commit c7a07c3b7c
2 changed files with 35 additions and 5 deletions
+30
View File
@@ -0,0 +1,30 @@
{
"api_compatibility": ["14", "15"],
"space": "Laboratoire Ouvert Lyonnais",
"logo": "https://labolyon.fr/images/logo_picto.svg",
"url": "https://labolyon.fr/",
"location": {
"address": "7 Place Louis Chazette 69001 Lyon, France",
"lon": 4.8372366,
"lat": 45.7732494,
"country_code": "FR",
"timezone": "Europe/Paris"
},
"contact": {
"irc": "ircs://irc.geeknode.org:6697/labolyon",
"ml": "discussions@listes.labolyon.fr",
"mastodon": "@labolyon@nerdculture.de",
"matrix": "#lol-space:chat.labolyon.fr"
},
"state": {
"icon": {
"closed": "https://labolyon.fr/status/status.ferm%C3%A9.png",
"open": "https://labolyon.fr/status/status.ouvert.png"
},
"open": false
},
"projects": [
"https://git.labolyon.fr/",
"https://wiki.labolyon.fr/"
]
}
+5 -5
View File
@@ -8,16 +8,16 @@ if [ "$#" = "0" ]; then
exit 1
fi
#SPACE_JSON=/var/www/html/spaceapi/space.json
SPACE_JSON=/var/www/html/spaceapi/space.json
if [ "$1" = "opened" ]; then
ln -sf "index.ouvert.html" "$(dirname $0)/index.html"
#jq "setpath([\"state\", \"open\"]; true) | setpath([\"state\", \"lastchange\"]; $(date +%s))" < $SPACE_JSON > $SPACE_JSON.new &&
#mv -f $SPACE_JSON.new $SPACE_JSON
jq "setpath([\"state\", \"open\"]; true) | setpath([\"state\", \"lastchange\"]; $(date +%s))" < $SPACE_JSON > $SPACE_JSON.new &&
mv -f $SPACE_JSON.new $SPACE_JSON
fi
if [ "$1" = "closed" ]; then
ln -sf "index.fermé.html" "$(dirname $0)/index.html"
#jq "setpath([\"state\", \"open\"]; false) | setpath([\"state\", \"lastchange\"]; $(date +%s))" < $SPACE_JSON > $SPACE_JSON.new &&
#mv -f $SPACE_JSON.new $SPACE_JSON
jq "setpath([\"state\", \"open\"]; false) | setpath([\"state\", \"lastchange\"]; $(date +%s))" < $SPACE_JSON > $SPACE_JSON.new &&
mv -f $SPACE_JSON.new $SPACE_JSON
fi