Skip to content

Conversation

@arnesetzer
Copy link
Contributor

@arnesetzer arnesetzer commented Jan 16, 2023

👋 I did some awesome work for the Pelias project and would love for everyone to have a look at it and provide feedback.


Here's the reason for this change 🚀


Here's what actually got changed 👏

  • Now the downloader and importer only accept an array.
  • The function lib/countryCodeArrayCreator.js creates the array, if not provided, and validates all iso codes.

Sorry, that this is a new PR, but I didn't figured out how to hang on the old PR

@arnesetzer arnesetzer marked this pull request as ready for review January 16, 2023 12:28
@arnesetzer arnesetzer marked this pull request as draft January 27, 2023 08:36
@arnesetzer arnesetzer marked this pull request as ready for review January 27, 2023 08:50
@arnesetzer
Copy link
Contributor Author

arnesetzer commented Mar 9, 2023

In case anybody has the same problem: I made a little workaround shell script, which basically just loops over all CountryCodes, puts them in the pelias.json and runs the downloader & importer. Requires jq and the pelias docker image installed.

#!/bin/bash
for i in DE AT CH CZ;
do
        #echo "$i"
        jq '.imports.geonames.countryCode="'"$i"'"' pelias.json
        pelias download geonames
        pelias import geonames
done

@stouch
Copy link

stouch commented Jun 23, 2023

Why is this has been blocked ?

Thanks @arnesetzer , in my case (Ubuntu) I had to do :

for i in FR DE NL;
do
    cat <<< $(jq '.imports.geonames.countryCode="'"$i"'"' pelias.json) > pelias.json
    pelias download geonames
    pelias import geonames
done

@arnesetzer arnesetzer marked this pull request as draft June 30, 2023 08:38
@arnesetzer
Copy link
Contributor Author

Ah, my bad. Forgot to convert it to a draft. The download works as expected, but if you try to import geonames It throws an expection due to a reuse of the elasticsearch config. I found this issue, but it won't change anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple countryCodes

3 participants