diff options
author | typebrook <typebrook@gmail.com> | 2019-12-03 02:40:41 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2019-12-03 02:40:41 +0800 |
commit | b6ffa8b746eed0aa2f1032fbc9f2b45a875e6f15 (patch) | |
tree | 19252fadf498b8478f8c02af71600caa28c90f85 /scripts/match.sh | |
parent | 3a937275bca2728a544a7284ae12ea567787152f (diff) |
update
Diffstat (limited to 'scripts/match.sh')
-rwxr-xr-x | scripts/match.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/match.sh b/scripts/match.sh new file mode 100755 index 0000000..22f3658 --- /dev/null +++ b/scripts/match.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | #set -x | ||
4 | |||
5 | ACCESS_TOKEN=$(cat ~/settings/tokens/mapbox) | ||
6 | |||
7 | #paste -d' ' \ | ||
8 | # <(sed -nr '/<trk>/,/<\/trk>/ { s/.*<time>(.*)<\/time>/\1/p }' $1 | xargs -I {} date -d "{}" +%s --utc) \ | ||
9 | # <(sed -nr 's/.*lon=\"([^\"]+)\" lat=\"([^\"]+)\".*/\1 \2/p' $1) | ||
10 | |||
11 | sed -nr 's/.*lon=\"([^\"]+)\" lat=\"([^\"]+)\".*/\1,\2/p' $1 |\ | ||
12 | xargs -L100 echo -n |\ | ||
13 | echo jojo | ||
14 | #tr ' ' ';' |\ | ||
15 | #sed 's/^/coordinates=/' |\ | ||
16 | #curl -X POST \ | ||
17 | # --data @- \ | ||
18 | # https://api.mapbox.com/matching/v4/mapbox/driving?access_token=$ACCESS_TOKEN&geometries=geojson&steps=true | ||
19 | |||