diff --git a/explorer.sh b/explorer.sh index 5ad8998..cc5ea9f 100755 --- a/explorer.sh +++ b/explorer.sh @@ -128,6 +128,15 @@ anniversary() { jq "$jqNewUD" <<<$jsonData } +today() { + todayDate=$(date +'%d-%m-%y') + jq '.[] | select(.date=="'$todayDate'")' <<<$jsonData +} + +update() { + curl -s https://g1-stats.axiom-team.fr/data/daily.json > $jsonFile && echo "Data have been updated" || echo "Error: Can't update data" +} + print() { jq . <<<"$jsonData" }