cargo build --release ./target/release/countries
# In a nutshell, it does this
curl https://restcountries.com/v3.1/all | jq -r '[.[] | {"name": .["name"].["common"], "code": .["cca2"],"captial": .["capital"].[0], "population": .["population"]}]' > output.json
# But also downloads files from another api
Flag Name Capital Population
UA Ukraine Kiev 44134693
...
for each country generated in country.txt it also downloads flag {code}.png image
- https://restcountries.com/v3.1/all for file
- https://flagsapi.com/UA/flat/64.png for image retrieval