14 lines
517 B
Bash
Executable File
14 lines
517 B
Bash
Executable File
[ -e lines.json ] || wget "https://data.metromobilite.fr/api/lines/json?types=ligne&reseaux=SEM" -O lines.json
|
|
[ -e routes.json ] || wget "https://data.metromobilite.fr/api/routers/default/index/routes" -O routes.json
|
|
|
|
cat > /tmp/connections <<EOF
|
|
graph connections {
|
|
node [style=filled, fontsize=20, fontname="sans-serif"]
|
|
EOF
|
|
|
|
jq -rf jq/graphnodes.jq routes.json >> /tmp/connections
|
|
jq -rf jq/graphedges.jq lines.json >> /tmp/connections
|
|
|
|
echo '}' >> /tmp/connections
|
|
circo -Tpng /tmp/connections > connections.png
|