From 7576000ed5bce33a42897eedfd30eccc6751da23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= Date: Wed, 19 May 2021 17:22:39 +0200 Subject: [PATCH] Improve tools for stats fetching and compiling --- Docs/Tools/compileStats.sh | 3 +-- Docs/Tools/fetchStats.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Docs/Tools/compileStats.sh b/Docs/Tools/compileStats.sh index d5d286019..d9e2dae56 100755 --- a/Docs/Tools/compileStats.sh +++ b/Docs/Tools/compileStats.sh @@ -2,5 +2,4 @@ ./fetchStats.sh ./csvPerChange.sh -python csvGrapher.py - +python3 csvGrapher.py diff --git a/Docs/Tools/fetchStats.sh b/Docs/Tools/fetchStats.sh index eaf13864a..274032e9a 100755 --- a/Docs/Tools/fetchStats.sh +++ b/Docs/Tools/fetchStats.sh @@ -8,7 +8,7 @@ fi NEXT_URL=$(echo "https://osmcha.org/api/v1/changesets/?date__gte=2021-01-01&date__lte=$DATE&editor=mapcomplete&page=$COUNTER&page_size=1000") rm stats.*.json -while [[ "$NEXT_URL" != "" ]] +while [[ "$NEXT_URL" != "null" ]] do echo "$COUNTER '$NEXT_URL'" curl "$NEXT_URL" -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: https://osmcha.org/?filters=%7B%22date__gte%22%3A%5B%7B%22label%22%3A%222020-07-05%22%2C%22value%22%3A%222020-07-05%22%7D%5D%2C%22editor%22%3A%5B%7B%22label%22%3A%22mapcomplete%22%2C%22value%22%3A%22mapcomplete%22%7D%5D%7D' -H 'Content-Type: application/json' -H 'Authorization: Token 6e422e2afedb79ef66573982012000281f03dc91' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'TE: Trailers' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -o stats.$COUNTER.json