UnownHash / Fletchling

10 stars 3 forks source link

fletchling-importer: process all areas flag #3

Closed lenisko closed 8 months ago

lenisko commented 8 months ago

Having a looong list of areas, I think it makes sense to process all areas from an input project. Maybe a switch like -all-input-areas that would allow to process without -overpass-area

./bin/fletchling-importer/fletchling-importer -overpass-areas-src koji -overpass-koji-project 'EnabledAreas' -overpass-area 'Warszawa' overpass db
lenisko commented 8 months ago

For now went with bash solution

#!/bin/bash

areas=$(curl -s http://127.0.0.1:48080/api/v1/geofence/featureCollection/NestCities?name=true | jq -r '.data.features[]["properties"]["name"]')

echo "$areas" | while IFS= read -r areaName; do
    echo "Processing: $areaName"
    ./bin/fletchling-importer/fletchling-importer -overpass-areas-src koji -overpass-koji-project 'NestCities' -overpass-area "$areaName" overpass db
done
lenisko commented 8 months ago

Solved in https://github.com/UnownHash/Fletchling/pull/5. Thanks!