@@ -19,18 +19,21 @@ docker compose run --rm addok-fr bash -c "\\
1919 # Duplicate entry, one for each postcode
2020 # https://github.com/addok/addok/issues/811
2121 zcat /addresses/bano.sjson.gz | \\
22- jq -c '. | select(.type==\" city\" or .type==\" town\" or .type==\" village\" ) | . + {citycode: (.citycode // .id) } | (. + {postcode: .postcode | (if type!=\" array\" then . else .[] end)})' | \\
22+ jq -c '. | select(.type==\" city\" or .type==\" town\" or .type==\" village\" )' | \\
23+ jq -c 'del(.departement) | del(.region)' | \\
24+ jq -c '. + {citycode: (.citycode // .id) } | (. + {postcode: .postcode | (if type!=\" array\" then . else .[] end)}) | (. + {city: .city | (if type!=\" array\" then . else .[] end)})' | \\
2325 jq -c 'def mapping: {\" city\" :\" municipality\" ,\" town\" :\" municipality\" ,\" village\" :\" municipality\" ,\" place\" :\" locality\" ,\" street\" :\" street\" }; . + {type: mapping[.type]}' | \\
2426 addok batch"
2527
2628docker compose run --rm addok-fr bash -c " \\
2729 zcat /addresses/bano.sjson.gz | \\
28- jq -c '. | select(.type==\" place\" or .type==\" street\" ) | . + {citycode: (.citycode // .id) }' | \\
30+ jq -c '. | select(.type==\" place\" or .type==\" street\" )' | \\
31+ jq -c 'del(.departement) | del(.region) | del(.housenumbers[]?.id)' | \\
32+ jq -c '. + {citycode: (.citycode // .id) } | (. + {city: .city | (if type!=\" array\" then . else .[] end)})' | \\
2933 jq -c 'def mapping: {\" city\" :\" municipality\" ,\" town\" :\" municipality\" ,\" village\" :\" municipality\" ,\" place\" :\" locality\" ,\" street\" :\" street\" }; . + {type: mapping[.type]}' | \\
30- jq -c 'del(.housenumbers[]?.id)' | \\
3134 addok batch"
3235
33- # # Patch BANO
36+ # Patch BANO
3437docker compose run --rm --entrypoint /bin/bash addok-fr -c " ls ./addresses/*.*json | xargs cat | addok batch"
3538
3639docker compose run --rm addok-fr addok ngrams
0 commit comments