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.92k stars 1.26k forks source link

'convert -i name' instead of '-i=name' in README.md #505

Closed yuuhic closed 8 months ago

yuuhic commented 8 months ago

The current version of README.md#customising-the-output saids...

php countries.php convert --include-field=name --include-field=area

# or using the shorter -i syntax: php countries.php convert -i=name -i=area

but, if '=' is given to the -i option, ALL fields are output. We must use ' ' instead of '=' to get the expected result.

$ # all fields are output. ( but the "Output fields:" is empty.🤔 )
$ php countries.php convert -i=name -f json -v
Output fields: 
Converting to json
Converted data for 250 countries into 1 format.
$ # only name field is output.
$ php countries.php convert -i name -f json -v
Output fields: name
Converting to json
Converted data for 250 countries into 1 format.

note: The '-x' option already uses spaces.

mledoze commented 8 months ago

Fixed via #506