Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.16 KB

README.md

File metadata and controls

52 lines (40 loc) · 1.16 KB

beta release: not stable, not fashion... just work

This is a JSON generator for countries standards like ISO3166, flags, phone prefix and currency.

The output it's like:

[
    ...
    {
        "name": "Tuvalu",
        "prefix": "688",
        "currency": "Australian Dollar",
        "alpha2": "TV",
        "alpha3": "TUV",
        "images": {
            "svg_square": "./build/flags/svg/1x1/tv.svg",
            "svg": "./build/flags/svg/4x3/tv.svg",
            "png_square": "./build/flags/png/1x1/tv.png",
            "png": "./build/flags/png/4x3/tv.png"
        }
    },
    ...
]

It fetch data from:

Generate JSON

git clone https://github.com/pnicorelli/countries.git
cd countries
git submodule init
git submodule update --recursive
npm install
npm start

and then, in the ./build directory you'll have:

  • country.json data cleaned with flags in relative paths.
  • full.json raw data.
  • flags/ directory with SVG and PNG in 1x1 / 4x3 sizes.

TODO

It need some kind of refactoring :)