mledoze / countries

World countries in JSON, CSV, XML and Yaml. Any help is welcome!
https://mledoze.github.io/countries/
Open Data Commons Open Database License v1.0
5.93k stars 1.26k forks source link

When customising the output the field "callingCodes" is excluded #475

Closed BenJackGill closed 10 months ago

BenJackGill commented 1 year ago

I am running this custom output command: php countries.php convert --include-field=name --include-field=cca2 --include-field=callingCodes

But only name and cca2 are included in the output. callingCodes field is always excluded.

BenJackGill commented 1 year ago

Update: If you want callingCodes then you need to use --include-field=idd. The output will then have both idd and callingCodes fields automatically included. It seems you cannot just get callingCodes alone.

For example, my previous command would be php countries.php convert --include-field=name --include-field=cca2 --include-field=idd

If this is the intended behaviour I suggest updating the readme doc to reflect that.

mledoze commented 10 months ago

Hi,

I think this is an unintended consequence of #389. I will look into it.

mledoze commented 10 months ago

@BenJackGill I have prepared a fix for this here #487, which will be released in the 5.0 version.

Thank you for your patience.

mledoze commented 10 months ago

fixed via #487