From adb4fc676d67482d004e66ffa6204ec56664b185 Mon Sep 17 00:00:00 2001 From: apainintheneck Date: Sun, 17 Dec 2023 19:56:54 -0800 Subject: [PATCH 1/3] Cache all country data The goal here is to remove both runtime dependencies and slow code that has be loaded. It's for performance and to just ship less code which is always a good thing assuming things work the same way. I added two new cache generation commands one for lists and the other for formatted output. This makes things much simpler at runtime though of course all of the complexity is in pre-computing and making sure that the pre-computed data is up-to-date. --- README.md | 39 +++-- Rakefile | 6 +- cache/README.md | 8 ++ cache/formatted_output/README.md | 119 +++++++++++++++ cache/formatted_output/country_title.json | 1 + cache/formatted_output/multiline_country.json | 1 + cache/formatted_output/one_line_country.json | 1 + cache/formatted_output/one_line_currency.json | 1 + cache/list/README.md | 61 ++++++++ cache/list/all_countries.json | 1 + cache/list/all_subregions.json | 1 + lib/atlasq/command/any.rb | 6 +- lib/atlasq/command/base.rb | 2 +- lib/atlasq/command/country.rb | 13 +- lib/atlasq/command/region.rb | 4 +- lib/atlasq/data.rb | 87 +++-------- lib/atlasq/format.rb | 136 ++++++------------ lib/atlasq/util/string.rb | 3 +- lib/atlasq/util/word_map.rb | 14 +- script/generate_formatted_output.rb | 103 +++++++++++++ script/generate_list.rb | 40 ++++++ script/generate_search_index.rb | 30 +--- script/shared/country_info.rb | 28 ++++ test/fixtures/all_regions_output.txt | 2 +- test/test_atlasq.rb | 19 ++- test/test_shell.rb | 22 ++- 26 files changed, 487 insertions(+), 261 deletions(-) create mode 100644 cache/formatted_output/README.md create mode 100644 cache/formatted_output/country_title.json create mode 100644 cache/formatted_output/multiline_country.json create mode 100644 cache/formatted_output/one_line_country.json create mode 100644 cache/formatted_output/one_line_currency.json create mode 100644 cache/list/README.md create mode 100644 cache/list/all_countries.json create mode 100644 cache/list/all_subregions.json create mode 100644 script/generate_formatted_output.rb create mode 100644 script/generate_list.rb create mode 100644 script/shared/country_info.rb diff --git a/README.md b/README.md index 11ba277..b5a9d7a 100644 --- a/README.md +++ b/README.md @@ -100,13 +100,12 @@ $ atlasq --country 418 * Country: The Lao People's Democratic Republic * * * * * * * * * * * * * * * * * * * * * * * * * (๐Ÿ‡ฑ๐Ÿ‡ฆ | 418 | LA | LAO | Lao People's Democratic Republic) - | Search Term: 418 - | Languages: Lao - | Nationality: Laotian - | Region: South-Eastern Asia - | Continent: Asia - | Currency: โ‚ญ Lao Kip - |________________________________________ + | Languages: Lao + | Nationality: Laotian + | Region: South-Eastern Asia + | Continent: Asia + | Currency: โ‚ญ Lao Kip + |________________________________________ ``` @@ -116,13 +115,12 @@ $ atlasq --country AM * Country: The Republic of Armenia * * * * * * * * * * * * * * * * * * * (๐Ÿ‡ฆ๐Ÿ‡ฒ | 051 | AM | ARM | Armenia) - | Search Term: AM - | Languages: Armenian / Russian - | Nationality: Armenian - | Region: Western Asia - | Continent: Asia - | Currency: ีคึ€. Armenian Dram - |________________________________________ + | Languages: Armenian / Russian + | Nationality: Armenian + | Region: Western Asia + | Continent: Asia + | Currency: ีคึ€. Armenian Dram + |________________________________________ ``` @@ -132,13 +130,12 @@ $ atlasq --country honduras * Country: The Republic of Honduras * * * * * * * * * * * * * * * * * * * (๐Ÿ‡ญ๐Ÿ‡ณ | 340 | HN | HND | Honduras) - | Search Term: honduras - | Languages: Spanish; Castilian - | Nationality: Honduran - | Region: Central America - | Continent: North America - | Currency: L Honduran Lempira - |________________________________________ + | Languages: Spanish; Castilian + | Nationality: Honduran + | Region: Central America + | Continent: North America + | Currency: L Honduran Lempira + |________________________________________ ``` diff --git a/Rakefile b/Rakefile index b7d5f9a..bcd4539 100644 --- a/Rakefile +++ b/Rakefile @@ -14,7 +14,7 @@ require "rubocop/rake_task" RuboCop::RakeTask.new -task default: %i[test lint] +task default: %i[lint test] desc "Shortcut for `rake rubocop`" task lint: :rubocop @@ -44,10 +44,14 @@ namespace "cache" do desc "Check if the cache needs to be regenerated" task :outdated do sh "bundle exec ruby script/generate_search_index.rb outdated" + sh "bundle exec ruby script/generate_formatted_output.rb outdated" + sh "bundle exec ruby script/generate_list.rb outdated" end desc "Regenerate the cache" task :generate do sh "bundle exec ruby script/generate_search_index.rb generate" + sh "bundle exec ruby script/generate_formatted_output.rb generate" + sh "bundle exec ruby script/generate_list.rb generate" end end diff --git a/cache/README.md b/cache/README.md index 71c7037..231195f 100644 --- a/cache/README.md +++ b/cache/README.md @@ -14,6 +14,14 @@ Note: Sample data can be found in the `README.md` file in each subdirectory. As the name would suggest, this generates a bunch of search indexes that are basic JSON files with string to string mappings (no nested nonsense). These are used primarily to speed up partial matches though pre-computing things also means we don't have to pull in the internationalization libraries for 90+ languages which also makes a difference. +### script/generate_formatted_output.rb + +This is where we generate the formatted output so that we don't need to include runtime dependencies to load country, currency and region informaton. + +### script/generate_list.rb + +This script generates a few simple lists of countries and regions. + ## Reading Reading from the cached files is quite easy. Just use the `Atlas::Cache` module to load the file using the namespace and file name. Each file gets lazy loaded the first time it's referenced and then memoized. Specified in `lib/atlasq/cache.rb`. diff --git a/cache/formatted_output/README.md b/cache/formatted_output/README.md new file mode 100644 index 0000000..c490ca0 --- /dev/null +++ b/cache/formatted_output/README.md @@ -0,0 +1,119 @@ +# Cache: formatted_output + +--- + +## Item: formatted_output/one_line_country.json + +### Content Sample +Sample of the first 20 pretty printed lines of the file. + +``` +{ + "ad": "(๐Ÿ‡ฆ๐Ÿ‡ฉ | 020 | AD | AND | Andorra)", + "ae": "(๐Ÿ‡ฆ๐Ÿ‡ช | 784 | AE | ARE | United Arab Emirates)", + "af": "(๐Ÿ‡ฆ๐Ÿ‡ซ | 004 | AF | AFG | Afghanistan)", + "ag": "(๐Ÿ‡ฆ๐Ÿ‡ฌ | 028 | AG | ATG | Antigua and Barbuda)", + "ai": "(๐Ÿ‡ฆ๐Ÿ‡ฎ | 660 | AI | AIA | Anguilla)", + "al": "(๐Ÿ‡ฆ๐Ÿ‡ฑ | 008 | AL | ALB | Albania)", + "am": "(๐Ÿ‡ฆ๐Ÿ‡ฒ | 051 | AM | ARM | Armenia)", + "ao": "(๐Ÿ‡ฆ๐Ÿ‡ด | 024 | AO | AGO | Angola)", + "aq": "(๐Ÿ‡ฆ๐Ÿ‡ถ | 010 | AQ | ATA | Antarctica)", + "ar": "(๐Ÿ‡ฆ๐Ÿ‡ท | 032 | AR | ARG | Argentina)", + "as": "(๐Ÿ‡ฆ๐Ÿ‡ธ | 016 | AS | ASM | American Samoa)", + "at": "(๐Ÿ‡ฆ๐Ÿ‡น | 040 | AT | AUT | Austria)", + "au": "(๐Ÿ‡ฆ๐Ÿ‡บ | 036 | AU | AUS | Australia)", + "aw": "(๐Ÿ‡ฆ๐Ÿ‡ผ | 533 | AW | ABW | Aruba)", + "ax": "(๐Ÿ‡ฆ๐Ÿ‡ฝ | 248 | AX | ALA | ร…land Islands)", + "az": "(๐Ÿ‡ฆ๐Ÿ‡ฟ | 031 | AZ | AZE | Azerbaijan)", + "ba": "(๐Ÿ‡ง๐Ÿ‡ฆ | 070 | BA | BIH | Bosnia and Herzegovina)", + "bb": "(๐Ÿ‡ง๐Ÿ‡ง | 052 | BB | BRB | Barbados)", + "bd": "(๐Ÿ‡ง๐Ÿ‡ฉ | 050 | BD | BGD | Bangladesh)", +... +``` + +## Item: formatted_output/country_title.json + +### Content Sample +Sample of the first 20 pretty printed lines of the file. + +``` +{ + "ad": "Country: The Principality of Andorra", + "ae": "Country: The United Arab Emirates", + "af": "Country: The Islamic Republic of Afghanistan", + "ag": "Country: Antigua and Barbuda", + "ai": "Country: Anguilla", + "al": "Country: The Republic of Albania", + "am": "Country: The Republic of Armenia", + "ao": "Country: The Republic of Angola", + "aq": "Country: Antarctica", + "ar": "Country: The Argentine Republic", + "as": "Country: The Territory of American Samoa", + "at": "Country: The Republic of Austria", + "au": "Country: The Commonwealth of Australia", + "aw": "Country: Aruba", + "ax": "Country: ร…land", + "az": "Country: The Republic of Azerbaijan", + "ba": "Country: Bosnia and Herzegovina", + "bb": "Country: Barbados", + "bd": "Country: The People's Republic of Bangladesh", +... +``` + +## Item: formatted_output/multiline_country.json + +### Content Sample +Sample of the first 20 pretty printed lines of the file. + +``` +{ + "ad": " | Languages: Catalan; Valencian\n | Nationality: Andorran\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________", + "ae": " | Languages: Arabic\n | Nationality: Emirian\n | Region: Western Asia\n | Continent: Asia\n | Currency: ุฏ.ุฅ United Arab Emirates Dirham\n |________________________________________", + "af": " | Languages: Pushto; Pashto / Uzbek / Turkmen\n | Nationality: Afghan\n | Region: Southern Asia\n | Continent: Asia\n | Currency: ุ‹ Afghan Afghani\n |________________________________________", + "ag": " | Languages: English\n | Nationality: Antiguan, Barbudan\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________", + "ai": " | Languages: English\n | Nationality: Anguillian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________", + "al": " | Languages: Albanian\n | Nationality: Albanian\n | Region: Southern Europe\n | Continent: Europe\n | Currency: L Albanian Lek\n |________________________________________", + "am": " | Languages: Armenian / Russian\n | Nationality: Armenian\n | Region: Western Asia\n | Continent: Asia\n | Currency: ีคึ€. Armenian Dram\n |________________________________________", + "ao": " | Languages: Portuguese\n | Nationality: Angolan\n | Region: Middle Africa\n | Continent: Africa\n | Currency: Kz Angolan Kwanza\n |________________________________________", + "aq": " | Continent: Antarctica\n | Currency: $ United States Dollar\n |________________________________________", + "ar": " | Languages: Spanish; Castilian / Guarani\n | Nationality: Argentinean\n | Region: South America\n | Continent: South America\n | Currency: $ Argentine Peso\n |________________________________________", + "as": " | Languages: English / Samoan\n | Nationality: American Samoan\n | Region: Polynesia\n | Continent: Australia\n | Currency: $ United States Dollar\n |________________________________________", + "at": " | Languages: German\n | Nationality: Austrian\n | Region: Western Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________", + "au": " | Languages: English\n | Nationality: Australian\n | Region: Australia and New Zealand\n | Continent: Australia\n | Currency: $ Australian Dollar\n |________________________________________", + "aw": " | Languages: Dutch; Flemish\n | Nationality: Aruban\n | Region: Caribbean\n | Continent: North America\n | Currency: ฦ’ Aruban Florin\n |________________________________________", + "ax": " | Languages: Swedish\n | Nationality: Swedish\n | Region: Northern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________", + "az": " | Languages: Azerbaijani / Armenian\n | Nationality: Azerbaijani\n | Region: Western Asia\n | Continent: Asia\n | Currency: โ‚ผ Azerbaijani Manat\n |________________________________________", + "ba": " | Languages: Bosnian / Croatian / Serbian\n | Nationality: Bosnian, Herzegovinian\n | Region: Southern Europe\n | Continent: Europe\n | Currency: ะšะœ Bosnia and Herzegovina Convertible Mark\n |________________________________________", + "bb": " | Languages: English\n | Nationality: Barbadian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ Barbadian Dollar\n |________________________________________", + "bd": " | Languages: Bengali\n | Nationality: Bangladeshi\n | Region: Southern Asia\n | Continent: Asia\n | Currency: เงณ Bangladeshi Taka\n |________________________________________", +... +``` + +## Item: formatted_output/one_line_currency.json + +### Content Sample +Sample of the first 20 pretty printed lines of the file. + +``` +{ + "eur": "[EUR] โ‚ฌ Euro", + "aed": "[AED] ุฏ.ุฅ United Arab Emirates Dirham", + "afn": "[AFN] ุ‹ Afghan Afghani", + "xcd": "[XCD] $ East Caribbean Dollar", + "all": "[ALL] L Albanian Lek", + "amd": "[AMD] ีคึ€. Armenian Dram", + "aoa": "[AOA] Kz Angolan Kwanza", + "usd": "[USD] $ United States Dollar", + "ars": "[ARS] $ Argentine Peso", + "aud": "[AUD] $ Australian Dollar", + "awg": "[AWG] ฦ’ Aruban Florin", + "azn": "[AZN] โ‚ผ Azerbaijani Manat", + "bam": "[BAM] ะšะœ Bosnia and Herzegovina Convertible Mark", + "bbd": "[BBD] $ Barbadian Dollar", + "bdt": "[BDT] เงณ Bangladeshi Taka", + "xof": "[XOF] Fr West African Cfa Franc", + "bgn": "[BGN] ะปะฒ. Bulgarian Lev", + "bhd": "[BHD] ุฏ.ุจ Bahraini Dinar", + "bif": "[BIF] Fr Burundian Franc", +... +``` diff --git a/cache/formatted_output/country_title.json b/cache/formatted_output/country_title.json new file mode 100644 index 0000000..c6d1c89 --- /dev/null +++ b/cache/formatted_output/country_title.json @@ -0,0 +1 @@ +{"ad":"Country: The Principality of Andorra","ae":"Country: The United Arab Emirates","af":"Country: The Islamic Republic of Afghanistan","ag":"Country: Antigua and Barbuda","ai":"Country: Anguilla","al":"Country: The Republic of Albania","am":"Country: The Republic of Armenia","ao":"Country: The Republic of Angola","aq":"Country: Antarctica","ar":"Country: The Argentine Republic","as":"Country: The Territory of American Samoa","at":"Country: The Republic of Austria","au":"Country: The Commonwealth of Australia","aw":"Country: Aruba","ax":"Country: ร…land","az":"Country: The Republic of Azerbaijan","ba":"Country: Bosnia and Herzegovina","bb":"Country: Barbados","bd":"Country: The People's Republic of Bangladesh","be":"Country: The Kingdom of Belgium","bf":"Country: Burkina Faso","bg":"Country: The Republic of Bulgaria","bh":"Country: The Kingdom of Bahrain","bi":"Country: The Republic of Burundi","bj":"Country: The Republic of Benin","bl":"Country: The Collectivity of Saint-Barthรฉlemy","bm":"Country: Bermuda","bn":"Country: The Nation of Brunei, the Abode of Peace","bo":"Country: The Plurinational State of Bolivia","bq":"Country: Bonaire, Sint Eustatius and Saba","br":"Country: The Federative Republic of Brazil","bs":"Country: The Commonwealth of The Bahamas","bt":"Country: The Kingdom of Bhutan","bv":"Country: Bouvet Island","bw":"Country: The Republic of Botswana","by":"Country: The Republic of Belarus","bz":"Country: Belize","ca":"Country: Canada","cc":"Country: The Territory of Cocos (Keeling) Islands","cd":"Country: The Democratic Republic of the Congo","cf":"Country: The Central African Republic","cg":"Country: The Republic of the Congo","ch":"Country: The Swiss Confederation","ci":"Country: The Republic of Cรดte d'Ivoire","ck":"Country: The Cook Islands","cl":"Country: The Republic of Chile","cm":"Country: The Republic of Cameroon","cn":"Country: The People's Republic of China","co":"Country: The Republic of Colombia","cr":"Country: The Republic of Costa Rica","cu":"Country: The Republic of Cuba","cv":"Country: The Republic of Cabo Verde","cw":"Country: The Country of Curaรงao","cx":"Country: The Territory of Christmas Island","cy":"Country: The Republic of Cyprus","cz":"Country: The Czech Republic","de":"Country: The Federal Republic of Germany","dj":"Country: The Republic of Djibouti","dk":"Country: The Kingdom of Denmark","dm":"Country: The Commonwealth of Dominica","do":"Country: The Dominican Republic","dz":"Country: The People's Democratic Republic of Algeria","ec":"Country: The Republic of Ecuador","ee":"Country: The Republic of Estonia","eg":"Country: The Arab Republic of Egypt","eh":"Country: The Sahrawi Arab Democratic Republic","er":"Country: The State of Eritrea","es":"Country: The Kingdom of Spain","et":"Country: The Federal Democratic Republic of Ethiopia","fi":"Country: The Republic of Finland","fj":"Country: The Republic of Fiji","fk":"Country: The Falkland Islands","fm":"Country: The Federated States of Micronesia","fo":"Country: The Faroe Islands","fr":"Country: The French Republic","ga":"Country: The Gabonese Republic","gb":"Country: The United Kingdom of Great Britain and Northern Ireland","gd":"Country: Grenada","ge":"Country: Georgia","gf":"Country: Guyane","gg":"Country: The Bailiwick of Guernsey","gh":"Country: The Republic of Ghana","gi":"Country: Gibraltar","gl":"Country: Kalaallit Nunaat","gm":"Country: The Republic of The Gambia","gn":"Country: The Republic of Guinea","gp":"Country: Guadeloupe","gq":"Country: The Republic of Equatorial Guinea","gr":"Country: The Hellenic Republic","gs":"Country: South Georgia and the South Sandwich Islands","gt":"Country: The Republic of Guatemala","gu":"Country: The Territory of Guam","gw":"Country: The Republic of Guinea-Bissau","gy":"Country: The Co-operative Republic of Guyana","hk":"Country: The Hong Kong Special Administrative Region of China","hm":"Country: The Territory of Heard Island and McDonald Islands","hn":"Country: The Republic of Honduras","hr":"Country: The Republic of Croatia","ht":"Country: The Republic of Haiti","hu":"Country: Hungary","id":"Country: The Republic of Indonesia","ie":"Country: Ireland","il":"Country: The State of Israel","im":"Country: The Isle of Man","in":"Country: The Republic of India","io":"Country: The British Indian Ocean Territory","iq":"Country: The Republic of Iraq","ir":"Country: The Islamic Republic of Iran","is":"Country: Iceland","it":"Country: The Italian Republic","je":"Country: The Bailiwick of Jersey","jm":"Country: Jamaica","jo":"Country: The Hashemite Kingdom of Jordan","jp":"Country: Japan","ke":"Country: The Republic of Kenya","kg":"Country: The Kyrgyz Republic","kh":"Country: The Kingdom of Cambodia","ki":"Country: The Republic of Kiribati","km":"Country: The Union of the Comoros","kn":"Country: Saint Kitts and Nevis","kp":"Country: The Democratic People's Republic of Korea","kr":"Country: The Republic of Korea","kw":"Country: The State of Kuwait","ky":"Country: The Cayman Islands","kz":"Country: The Republic of Kazakhstan","la":"Country: The Lao People's Democratic Republic","lb":"Country: The Lebanese Republic","lc":"Country: Saint Lucia","li":"Country: The Principality of Liechtenstein","lk":"Country: The Democratic Socialist Republic of Sri Lanka","lr":"Country: The Republic of Liberia","ls":"Country: The Kingdom of Lesotho","lt":"Country: The Republic of Lithuania","lu":"Country: The Grand Duchy of Luxembourg","lv":"Country: The Republic of Latvia","ly":"Country: The State of Libya","ma":"Country: The Kingdom of Morocco","mc":"Country: The Principality of Monaco","md":"Country: The Republic of Moldova","me":"Country: Montenegro","mf":"Country: The Collectivity of Saint-Martin","mg":"Country: The Republic of Madagascar","mh":"Country: The Republic of the Marshall Islands","mk":"Country: The Republic of North Macedonia","ml":"Country: The Republic of Mali","mm":"Country: The Republic of the Union of Myanmar","mn":"Country: Mongolia","mo":"Country: The Macao Special Administrative Region of China","mp":"Country: The Commonwealth of the Northern Mariana Islands","mq":"Country: Martinique","mr":"Country: The Islamic Republic of Mauritania","ms":"Country: Montserrat","mt":"Country: The Republic of Malta","mu":"Country: The Republic of Mauritius","mv":"Country: The Republic of Maldives","mw":"Country: The Republic of Malawi","mx":"Country: The United Mexican States","my":"Country: Malaysia","mz":"Country: The Republic of Mozambique","na":"Country: The Republic of Namibia","nc":"Country: New Caledonia","ne":"Country: The Republic of the Niger","nf":"Country: The Territory of Norfolk Island","ng":"Country: The Federal Republic of Nigeria","ni":"Country: The Republic of Nicaragua","nl":"Country: The Kingdom of the Netherlands","no":"Country: The Kingdom of Norway","np":"Country: The Federal Democratic Republic of Nepal","nr":"Country: The Republic of Nauru","nu":"Country: Niue","nz":"Country: New Zealand","om":"Country: The Sultanate of Oman","pa":"Country: The Republic of Panamรก","pe":"Country: The Republic of Perรบ","pf":"Country: French Polynesia","pg":"Country: The Independent State of Papua New Guinea","ph":"Country: The Republic of the Philippines","pk":"Country: The Islamic Republic of Pakistan","pl":"Country: The Republic of Poland","pm":"Country: The Overseas Collectivity of Saint-Pierre and Miquelon","pn":"Country: The Pitcairn, Henderson, Ducie and Oeno Islands","pr":"Country: The Commonwealth of Puerto Rico","ps":"Country: The State of Palestine","pt":"Country: The Portuguese Republic","pw":"Country: The Republic of Palau","py":"Country: The Republic of Paraguay","qa":"Country: The State of Qatar","re":"Country: Rรฉunion","ro":"Country: Romania","rs":"Country: The Republic of Serbia","ru":"Country: The Russian Federation","rw":"Country: The Republic of Rwanda","sa":"Country: The Kingdom of Saudi Arabia","sb":"Country: The Solomon Islands","sc":"Country: The Republic of Seychelles","sd":"Country: The Republic of the Sudan","se":"Country: The Kingdom of Sweden","sg":"Country: The Republic of Singapore","sh":"Country: Saint Helena, Ascension and Tristan da Cunha","si":"Country: The Republic of Slovenia","sj":"Country: Svalbard and Jan Mayen","sk":"Country: The Slovak Republic","sl":"Country: The Republic of Sierra Leone","sm":"Country: The Republic of San Marino","sn":"Country: The Republic of Senegal","so":"Country: The Federal Republic of Somalia","sr":"Country: The Republic of Suriname","ss":"Country: The Republic of South Sudan","st":"Country: The Democratic Republic of Sรฃo Tomรฉ and Prรญncipe","sv":"Country: The Republic of El Salvador","sx":"Country: Sint Maarten","sy":"Country: The Syrian Arab Republic","sz":"Country: The Kingdom of Eswatini","tc":"Country: The Turks and Caicos Islands","td":"Country: The Republic of Chad","tf":"Country: The French Southern and Antarctic Lands","tg":"Country: The Togolese Republic","th":"Country: The Kingdom of Thailand","tj":"Country: The Republic of Tajikistan","tk":"Country: Tokelau","tl":"Country: The Democratic Republic of Timor-Leste","tm":"Country: Turkmenistan","tn":"Country: The Republic of Tunisia","to":"Country: The Kingdom of Tonga","tr":"Country: The Republic of Tรผrkiye","tt":"Country: The Republic of Trinidad and Tobago","tv":"Country: Tuvalu","tw":"Country: Taiwan, Province of China","tz":"Country: The United Republic of Tanzania","ua":"Country: Ukraine","ug":"Country: The Republic of Uganda","um":"Country: United States Minor Outlying Islands","us":"Country: The United States of America","uy":"Country: The Oriental Republic of Uruguay","uz":"Country: The Republic of Uzbekistan","va":"Country: The Holy See","vc":"Country: Saint Vincent and the Grenadines","ve":"Country: The Bolivarian Republic of Venezuela","vg":"Country: The Virgin Islands","vi":"Country: The Virgin Islands of the United States","vn":"Country: The Socialist Republic of Viet Nam","vu":"Country: The Republic of Vanuatu","wf":"Country: The Territory of the Wallis and Futuna Islands","ws":"Country: The Independent State of Samoa","ye":"Country: The Republic of Yemen","yt":"Country: The Department of Mayotte","za":"Country: The Republic of South Africa","zm":"Country: The Republic of Zambia","zw":"Country: The Republic of Zimbabwe"} \ No newline at end of file diff --git a/cache/formatted_output/multiline_country.json b/cache/formatted_output/multiline_country.json new file mode 100644 index 0000000..24c07be --- /dev/null +++ b/cache/formatted_output/multiline_country.json @@ -0,0 +1 @@ +{"ad":" | Languages: Catalan; Valencian\n | Nationality: Andorran\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","ae":" | Languages: Arabic\n | Nationality: Emirian\n | Region: Western Asia\n | Continent: Asia\n | Currency: ุฏ.ุฅ United Arab Emirates Dirham\n |________________________________________","af":" | Languages: Pushto; Pashto / Uzbek / Turkmen\n | Nationality: Afghan\n | Region: Southern Asia\n | Continent: Asia\n | Currency: ุ‹ Afghan Afghani\n |________________________________________","ag":" | Languages: English\n | Nationality: Antiguan, Barbudan\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________","ai":" | Languages: English\n | Nationality: Anguillian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________","al":" | Languages: Albanian\n | Nationality: Albanian\n | Region: Southern Europe\n | Continent: Europe\n | Currency: L Albanian Lek\n |________________________________________","am":" | Languages: Armenian / Russian\n | Nationality: Armenian\n | Region: Western Asia\n | Continent: Asia\n | Currency: ีคึ€. Armenian Dram\n |________________________________________","ao":" | Languages: Portuguese\n | Nationality: Angolan\n | Region: Middle Africa\n | Continent: Africa\n | Currency: Kz Angolan Kwanza\n |________________________________________","aq":" | Continent: Antarctica\n | Currency: $ United States Dollar\n |________________________________________","ar":" | Languages: Spanish; Castilian / Guarani\n | Nationality: Argentinean\n | Region: South America\n | Continent: South America\n | Currency: $ Argentine Peso\n |________________________________________","as":" | Languages: English / Samoan\n | Nationality: American Samoan\n | Region: Polynesia\n | Continent: Australia\n | Currency: $ United States Dollar\n |________________________________________","at":" | Languages: German\n | Nationality: Austrian\n | Region: Western Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","au":" | Languages: English\n | Nationality: Australian\n | Region: Australia and New Zealand\n | Continent: Australia\n | Currency: $ Australian Dollar\n |________________________________________","aw":" | Languages: Dutch; Flemish\n | Nationality: Aruban\n | Region: Caribbean\n | Continent: North America\n | Currency: ฦ’ Aruban Florin\n |________________________________________","ax":" | Languages: Swedish\n | Nationality: Swedish\n | Region: Northern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","az":" | Languages: Azerbaijani / Armenian\n | Nationality: Azerbaijani\n | Region: Western Asia\n | Continent: Asia\n | Currency: โ‚ผ Azerbaijani Manat\n |________________________________________","ba":" | Languages: Bosnian / Croatian / Serbian\n | Nationality: Bosnian, Herzegovinian\n | Region: Southern Europe\n | Continent: Europe\n | Currency: ะšะœ Bosnia and Herzegovina Convertible Mark\n |________________________________________","bb":" | Languages: English\n | Nationality: Barbadian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ Barbadian Dollar\n |________________________________________","bd":" | Languages: Bengali\n | Nationality: Bangladeshi\n | Region: Southern Asia\n | Continent: Asia\n | Currency: เงณ Bangladeshi Taka\n |________________________________________","be":" | Languages: Dutch; Flemish / French / German\n | Nationality: Belgian\n | Region: Western Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","bf":" | Languages: French / Fulah\n | Nationality: Burkinabe\n | Region: Western Africa\n | Continent: Africa\n | Currency: Fr West African Cfa Franc\n |________________________________________","bg":" | Languages: Bulgarian\n | Nationality: Bulgarian\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: ะปะฒ. Bulgarian Lev\n |________________________________________","bh":" | Languages: Arabic\n | Nationality: Bahraini\n | Region: Western Asia\n | Continent: Asia\n | Currency: ุฏ.ุจ Bahraini Dinar\n |________________________________________","bi":" | Languages: French / Rundi\n | Nationality: Burundian\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: Fr Burundian Franc\n |________________________________________","bj":" | Languages: French\n | Nationality: Beninese\n | Region: Western Africa\n | Continent: Africa\n | Currency: Fr West African Cfa Franc\n |________________________________________","bl":" | Languages: French\n | Nationality: Saint Barthรฉlemy Islander\n | Region: Caribbean\n | Continent: North America\n | Currency: โ‚ฌ Euro\n |________________________________________","bm":" | Languages: English\n | Nationality: Bermudian\n | Region: Northern America\n | Continent: North America\n | Currency: $ Bermudian Dollar\n |________________________________________","bn":" | Languages: Malay\n | Nationality: Bruneian\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: $ Brunei Dollar\n |________________________________________","bo":" | Languages: Spanish; Castilian / Aymara / Quechua\n | Nationality: Bolivian\n | Region: South America\n | Continent: South America\n | Currency: Bs. Bolivian Boliviano\n |________________________________________","bq":" | Languages: Dutch; Flemish / English\n | Nationality: Dutch\n | Region: Caribbean\n | Continent: North America\n | Currency: $ United States Dollar\n |________________________________________","br":" | Languages: Portuguese\n | Nationality: Brazilian\n | Region: South America\n | Continent: South America\n | Currency: R$ Brazilian Real\n |________________________________________","bs":" | Languages: English\n | Nationality: Bahamian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ Bahamian Dollar\n |________________________________________","bt":" | Languages: Dzongkha\n | Nationality: Bhutanese\n | Region: Southern Asia\n | Continent: Asia\n | Currency: Nu. Bhutanese Ngultrum\n |________________________________________","bv":" | Continent: Antarctica\n | Currency: kr Norwegian Krone\n |________________________________________","bw":" | Languages: English / Tswana\n | Nationality: Motswana\n | Region: Southern Africa\n | Continent: Africa\n | Currency: P Botswana Pula\n |________________________________________","by":" | Languages: Belarusian / Russian\n | Nationality: Belarusian\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: Br Belarusian Ruble\n |________________________________________","bz":" | Languages: English / Spanish; Castilian\n | Nationality: Belizean\n | Region: Central America\n | Continent: North America\n | Currency: $ Belize Dollar\n |________________________________________","ca":" | Languages: English / French\n | Nationality: Canadian\n | Region: Northern America\n | Continent: North America\n | Currency: $ Canadian Dollar\n |________________________________________","cc":" | Languages: English\n | Nationality: Cocos Islander\n | Region: Australia and New Zealand\n | Continent: Asia\n | Currency: $ Australian Dollar\n |________________________________________","cd":" | Languages: French / Lingala / Kongo / Swahili\n | Nationality: Congolese\n | Region: Middle Africa\n | Continent: Africa\n | Currency: Fr Congolese Franc\n |________________________________________","cf":" | Languages: French / Sango\n | Nationality: Central African\n | Region: Middle Africa\n | Continent: Africa\n | Currency: CFA Central African Cfa Franc\n |________________________________________","cg":" | Languages: French / Lingala\n | Nationality: Congolese\n | Region: Middle Africa\n | Continent: Africa\n | Currency: CFA Central African Cfa Franc\n |________________________________________","ch":" | Languages: German / French / Italian\n | Nationality: Swiss\n | Region: Western Europe\n | Continent: Europe\n | Currency: CHF Swiss Franc\n |________________________________________","ci":" | Languages: French\n | Nationality: Ivorian\n | Region: Western Africa\n | Continent: Africa\n | Currency: Fr West African Cfa Franc\n |________________________________________","ck":" | Languages: English\n | Nationality: Cook Islander\n | Region: Polynesia\n | Continent: Australia\n | Currency: $ New Zealand Dollar\n |________________________________________","cl":" | Languages: Spanish; Castilian\n | Nationality: Chilean\n | Region: South America\n | Continent: South America\n | Currency: $ Chilean Peso\n |________________________________________","cm":" | Languages: English / French\n | Nationality: Cameroonian\n | Region: Middle Africa\n | Continent: Africa\n | Currency: CFA Central African Cfa Franc\n |________________________________________","cn":" | Languages: Chinese\n | Nationality: Chinese\n | Region: Eastern Asia\n | Continent: Asia\n | Currency: ยฅ Chinese Renminbi Yuan\n |________________________________________","co":" | Languages: Spanish; Castilian\n | Nationality: Colombian\n | Region: South America\n | Continent: South America\n | Currency: $ Colombian Peso\n |________________________________________","cr":" | Languages: Spanish; Castilian\n | Nationality: Costa Rican\n | Region: Central America\n | Continent: North America\n | Currency: โ‚ก Costa Rican Colรณn\n |________________________________________","cu":" | Languages: Spanish; Castilian\n | Nationality: Cuban\n | Region: Caribbean\n | Continent: North America\n | Currency: $ Cuban Peso\n |________________________________________","cv":" | Languages: Portuguese\n | Nationality: Cape Verdian\n | Region: Western Africa\n | Continent: Africa\n | Currency: $ Cape Verdean Escudo\n |________________________________________","cw":" | Languages: Dutch; Flemish\n | Nationality: Dutch\n | Region: Caribbean\n | Continent: North America\n | Currency: ฦ’ Netherlands Antillean Gulden\n |________________________________________","cx":" | Languages: English / Chinese / Malay\n | Nationality: Christmas Island\n | Region: Australia and New Zealand\n | Continent: Asia\n | Currency: $ Australian Dollar\n |________________________________________","cy":" | Languages: Greek, Modern (1453-) / Turkish / Armenian\n | Nationality: Cypriot\n | Region: Western Asia\n | Continent: Asia\n | Currency: โ‚ฌ Euro\n |________________________________________","cz":" | Languages: Czech / Slovak\n | Nationality: Czech\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: Kฤ Czech Koruna\n |________________________________________","de":" | Languages: German\n | Nationality: German\n | Region: Western Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","dj":" | Languages: Arabic / French\n | Nationality: Djibouti\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: Fdj Djiboutian Franc\n |________________________________________","dk":" | Languages: Danish\n | Nationality: Danish\n | Region: Northern Europe\n | Continent: Europe\n | Currency: kr. Danish Krone\n |________________________________________","dm":" | Languages: English\n | Nationality: Dominican\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________","do":" | Languages: Spanish; Castilian\n | Nationality: Dominican\n | Region: Caribbean\n | Continent: North America\n | Currency: $ Dominican Peso\n |________________________________________","dz":" | Languages: Arabic\n | Nationality: Algerian\n | Region: Northern Africa\n | Continent: Africa\n | Currency: ุฏ.ุฌ Algerian Dinar\n |________________________________________","ec":" | Languages: Spanish; Castilian\n | Nationality: Ecuadorean\n | Region: South America\n | Continent: South America\n | Currency: $ United States Dollar\n |________________________________________","ee":" | Languages: Estonian\n | Nationality: Estonian\n | Region: Northern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","eg":" | Languages: Arabic\n | Nationality: Egyptian\n | Region: Northern Africa\n | Continent: Africa\n | Currency: ุฌ.ู… Egyptian Pound\n |________________________________________","eh":" | Languages: Spanish; Castilian / French\n | Nationality: Sahrawi\n | Region: Northern Africa\n | Continent: Africa\n | Currency: ุฏ.ู…. Moroccan Dirham\n |________________________________________","er":" | Languages: English / Arabic / Tigrinya\n | Nationality: Eritrean\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: Br Ethiopian Birr\n |________________________________________","es":" | Languages: Spanish; Castilian\n | Nationality: Spanish\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","et":" | Languages: Amharic\n | Nationality: Ethiopian\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: Br Ethiopian Birr\n |________________________________________","fi":" | Languages: Finnish / Swedish\n | Nationality: Finnish\n | Region: Northern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","fj":" | Languages: English / Fijian / Hindi / Urdu\n | Nationality: Fijian\n | Region: Melanesia\n | Continent: Australia\n | Currency: $ Fijian Dollar\n |________________________________________","fk":" | Languages: English\n | Nationality: Falkland Islander\n | Region: South America\n | Continent: South America\n | Currency: ยฃ Falkland Pound\n |________________________________________","fm":" | Languages: English\n | Nationality: Micronesian\n | Region: Micronesia\n | Continent: Australia\n | Currency: $ United States Dollar\n |________________________________________","fo":" | Languages: Faroese\n | Nationality: Faroese\n | Region: Northern Europe\n | Continent: Europe\n | Currency: kr. Danish Krone\n |________________________________________","fr":" | Languages: French\n | Nationality: French\n | Region: Western Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","ga":" | Languages: French\n | Nationality: Gabonese\n | Region: Middle Africa\n | Continent: Africa\n | Currency: CFA Central African Cfa Franc\n |________________________________________","gb":" | Languages: English\n | Nationality: British\n | Region: Northern Europe\n | Continent: Europe\n | Currency: ยฃ British Pound\n |________________________________________","gd":" | Languages: English\n | Nationality: Grenadian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________","ge":" | Languages: Georgian\n | Nationality: Georgian\n | Region: Western Asia\n | Continent: Asia\n | Currency: แƒš Georgian Lari\n |________________________________________","gf":" | Languages: French\n | Nationality: French Guianan\n | Region: South America\n | Continent: South America\n | Currency: โ‚ฌ Euro\n |________________________________________","gg":" | Languages: English / French\n | Nationality: Channel Islander\n | Region: Northern Europe\n | Continent: Europe\n | Currency: ยฃ British Pound\n |________________________________________","gh":" | Languages: English\n | Nationality: Ghanaian\n | Region: Western Africa\n | Continent: Africa\n | Currency: โ‚ต Ghanaian Cedi\n |________________________________________","gi":" | Languages: English\n | Nationality: Gibraltar\n | Region: Southern Europe\n | Continent: Europe\n | Currency: ยฃ Gibraltar Pound\n |________________________________________","gl":" | Languages: Kalaallisut; Greenlandic\n | Nationality: Greenlandic\n | Region: Northern America\n | Continent: North America\n | Currency: kr. Danish Krone\n |________________________________________","gm":" | Languages: English\n | Nationality: Gambian\n | Region: Western Africa\n | Continent: Africa\n | Currency: D Gambian Dalasi\n |________________________________________","gn":" | Languages: French / Fulah\n | Nationality: Guinean\n | Region: Western Africa\n | Continent: Africa\n | Currency: Fr Guinean Franc\n |________________________________________","gp":" | Languages: French\n | Nationality: French\n | Region: Caribbean\n | Continent: North America\n | Currency: โ‚ฌ Euro\n |________________________________________","gq":" | Languages: Spanish; Castilian / French\n | Nationality: Equatorial Guinean\n | Region: Middle Africa\n | Continent: Africa\n | Currency: CFA Central African Cfa Franc\n |________________________________________","gr":" | Languages: Greek, Modern (1453-)\n | Nationality: Greek\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","gs":" | Languages: English\n | Nationality: South Georgia and the South Sandwich Islander\n | Region: South America\n | Continent: Antarctica\n | Currency: ยฃ British Pound\n |________________________________________","gt":" | Languages: Spanish; Castilian\n | Nationality: Guatemalan\n | Region: Central America\n | Continent: North America\n | Currency: Q Guatemalan Quetzal\n |________________________________________","gu":" | Languages: English / Chamorro / Spanish; Castilian\n | Nationality: Guamanian\n | Region: Micronesia\n | Continent: Australia\n | Currency: $ United States Dollar\n |________________________________________","gw":" | Languages: Portuguese\n | Nationality: Guinea-Bissauan\n | Region: Western Africa\n | Continent: Africa\n | Currency: Fr West African Cfa Franc\n |________________________________________","gy":" | Languages: English\n | Nationality: Guyanese\n | Region: South America\n | Continent: South America\n | Currency: $ Guyanese Dollar\n |________________________________________","hk":" | Languages: English / Chinese\n | Nationality: Hong Kongese\n | Region: Eastern Asia\n | Continent: Asia\n | Currency: $ Hong Kong Dollar\n |________________________________________","hm":" | Languages: English\n | Nationality: Heard and McDonald Islander\n | Continent: Antarctica\n | Currency: $ Australian Dollar\n |________________________________________","hn":" | Languages: Spanish; Castilian\n | Nationality: Honduran\n | Region: Central America\n | Continent: North America\n | Currency: L Honduran Lempira\n |________________________________________","hr":" | Languages: Croatian\n | Nationality: Croatian\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","ht":" | Languages: French / Haitian; Haitian Creole\n | Nationality: Haitian\n | Region: Caribbean\n | Continent: North America\n | Currency: G Haitian Gourde\n |________________________________________","hu":" | Languages: Hungarian\n | Nationality: Hungarian\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: Ft Hungarian Forint\n |________________________________________","id":" | Languages: Indonesian\n | Nationality: Indonesian\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: Rp Indonesian Rupiah\n |________________________________________","ie":" | Languages: English / Irish\n | Nationality: Irish\n | Region: Northern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","il":" | Languages: Hebrew / Arabic\n | Nationality: Israeli\n | Region: Western Asia\n | Continent: Asia\n | Currency: โ‚ช Israeli New Sheqel\n |________________________________________","im":" | Languages: English / Manx\n | Nationality: Manx\n | Region: Northern Europe\n | Continent: Europe\n | Currency: ยฃ British Pound\n |________________________________________","in":" | Languages: Hindi / English\n | Nationality: Indian\n | Region: Southern Asia\n | Continent: Asia\n | Currency: โ‚น Indian Rupee\n |________________________________________","io":" | Languages: English\n | Nationality: Indian\n | Region: Eastern Africa\n | Continent: Asia\n | Currency: $ United States Dollar\n |________________________________________","iq":" | Languages: Arabic\n | Nationality: Iraqi\n | Region: Western Asia\n | Continent: Asia\n | Currency: ุน.ุฏ Iraqi Dinar\n |________________________________________","ir":" | Languages: Persian\n | Nationality: Iranian\n | Region: Southern Asia\n | Continent: Asia\n | Currency: ๏ทผ Iranian Rial\n |________________________________________","is":" | Languages: Icelandic\n | Nationality: Icelander\n | Region: Northern Europe\n | Continent: Europe\n | Currency: kr. Icelandic Krรณna\n |________________________________________","it":" | Languages: Italian\n | Nationality: Italian\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","je":" | Languages: English / French\n | Nationality: Channel Islander\n | Region: Northern Europe\n | Continent: Europe\n | Currency: ยฃ British Pound\n |________________________________________","jm":" | Languages: English\n | Nationality: Jamaican\n | Region: Caribbean\n | Continent: North America\n | Currency: $ Jamaican Dollar\n |________________________________________","jo":" | Languages: Arabic\n | Nationality: Jordanian\n | Region: Western Asia\n | Continent: Asia\n | Currency: ุฏ.ุง Jordanian Dinar\n |________________________________________","jp":" | Languages: Japanese\n | Nationality: Japanese\n | Region: Eastern Asia\n | Continent: Asia\n | Currency: ยฅ Japanese Yen\n |________________________________________","ke":" | Languages: English / Swahili\n | Nationality: Kenyan\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: KSh Kenyan Shilling\n |________________________________________","kg":" | Languages: Kirghiz; Kyrgyz / Russian\n | Nationality: Kirghiz\n | Region: Central Asia\n | Continent: Asia\n | Currency: som Kyrgyzstani Som\n |________________________________________","kh":" | Languages: Central Khmer\n | Nationality: Cambodian\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: แŸ› Cambodian Riel\n |________________________________________","ki":" | Languages: English\n | Nationality: I-Kiribati\n | Region: Micronesia\n | Continent: Australia\n | Currency: $ Australian Dollar\n |________________________________________","km":" | Languages: Arabic / French\n | Nationality: Comoran\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: Fr Comorian Franc\n |________________________________________","kn":" | Languages: English\n | Nationality: Kittian and Nevisian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________","kp":" | Languages: Korean\n | Nationality: North Korean\n | Region: Eastern Asia\n | Continent: Asia\n | Currency: โ‚ฉ North Korean Won\n |________________________________________","kr":" | Languages: Korean\n | Nationality: South Korean\n | Region: Eastern Asia\n | Continent: Asia\n | Currency: โ‚ฉ South Korean Won\n |________________________________________","kw":" | Languages: Arabic\n | Nationality: Kuwaiti\n | Region: Western Asia\n | Continent: Asia\n | Currency: ุฏ.ูƒ Kuwaiti Dinar\n |________________________________________","ky":" | Languages: English\n | Nationality: Caymanian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ Cayman Islands Dollar\n |________________________________________","kz":" | Languages: Kazakh / Russian\n | Nationality: Kazakhstani\n | Region: Central Asia\n | Continent: Asia\n | Currency: โ‚ธ Kazakhstani Tenge\n |________________________________________","la":" | Languages: Lao\n | Nationality: Laotian\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: โ‚ญ Lao Kip\n |________________________________________","lb":" | Languages: Arabic / French\n | Nationality: Lebanese\n | Region: Western Asia\n | Continent: Asia\n | Currency: ู„.ู„ Lebanese Pound\n |________________________________________","lc":" | Languages: English\n | Nationality: Saint Lucian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________","li":" | Languages: German\n | Nationality: Liechtensteiner\n | Region: Western Europe\n | Continent: Europe\n | Currency: CHF Swiss Franc\n |________________________________________","lk":" | Languages: Sinhala; Sinhalese / Tamil\n | Nationality: Sri Lankan\n | Region: Southern Asia\n | Continent: Asia\n | Currency: โ‚จ Sri Lankan Rupee\n |________________________________________","lr":" | Languages: English\n | Nationality: Liberian\n | Region: Western Africa\n | Continent: Africa\n | Currency: $ Liberian Dollar\n |________________________________________","ls":" | Languages: English / Sotho, Southern\n | Nationality: Mosotho\n | Region: Southern Africa\n | Continent: Africa\n | Currency: L Lesotho Loti\n |________________________________________","lt":" | Languages: Lithuanian\n | Nationality: Lithuanian\n | Region: Northern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","lu":" | Languages: French / German / Luxembourgish; Letzeburgesch\n | Nationality: Luxembourger\n | Region: Western Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","lv":" | Languages: Latvian\n | Nationality: Latvian\n | Region: Northern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","ly":" | Languages: Arabic\n | Nationality: Libyan\n | Region: Northern Africa\n | Continent: Africa\n | Currency: ู„.ุฏ Libyan Dinar\n |________________________________________","ma":" | Languages: Arabic\n | Nationality: Moroccan\n | Region: Northern Africa\n | Continent: Africa\n | Currency: ุฏ.ู…. Moroccan Dirham\n |________________________________________","mc":" | Languages: French\n | Nationality: Monegasque\n | Region: Western Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","md":" | Languages: Romanian; Moldavian; Moldovan\n | Nationality: Moldovan\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: L Moldovan Leu\n |________________________________________","me":" | Languages: Serbian / Bosnian / Albanian / Croatian\n | Nationality: Montenegrin\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","mf":" | Languages: English / French / Dutch; Flemish\n | Nationality: French\n | Region: Caribbean\n | Continent: North America\n | Currency: โ‚ฌ Euro\n |________________________________________","mg":" | Languages: French / Malagasy\n | Nationality: Malagasy\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: Ar Malagasy Ariary\n |________________________________________","mh":" | Languages: English / Marshallese\n | Nationality: Marshallese\n | Region: Micronesia\n | Continent: Australia\n | Currency: $ United States Dollar\n |________________________________________","mk":" | Languages: Macedonian\n | Nationality: Macedonian\n | Region: Southern Europe\n | Continent: Europe\n | Currency: ะดะตะฝ Macedonian Denar\n |________________________________________","ml":" | Languages: French\n | Nationality: Malian\n | Region: Western Africa\n | Continent: Africa\n | Currency: Fr West African Cfa Franc\n |________________________________________","mm":" | Languages: Burmese\n | Nationality: Myanmarian\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: K Myanmar Kyat\n |________________________________________","mn":" | Languages: Mongolian\n | Nationality: Mongolian\n | Region: Eastern Asia\n | Continent: Asia\n | Currency: โ‚ฎ Mongolian Tรถgrรถg\n |________________________________________","mo":" | Languages: Chinese / Portuguese\n | Nationality: Chinese\n | Region: Eastern Asia\n | Continent: Asia\n | Currency: P Macanese Pataca\n |________________________________________","mp":" | Languages: English / Chamorro\n | Nationality: American\n | Region: Micronesia\n | Continent: Australia\n | Currency: $ United States Dollar\n |________________________________________","mq":" | Languages: French\n | Nationality: French\n | Region: Caribbean\n | Continent: North America\n | Currency: โ‚ฌ Euro\n |________________________________________","mr":" | Languages: Arabic / French\n | Nationality: Mauritanian\n | Region: Western Africa\n | Continent: Africa\n | Currency: UM Mauritanian Ouguiya\n |________________________________________","ms":" | Languages: English\n | Nationality: Montserratian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________","mt":" | Languages: Maltese / English\n | Nationality: Maltese\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","mu":" | Languages: English\n | Nationality: Mauritian\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: โ‚จ Mauritian Rupee\n |________________________________________","mv":" | Languages: Divehi; Dhivehi; Maldivian\n | Nationality: Maldivan\n | Region: Southern Asia\n | Continent: Asia\n | Currency: MVR Maldivian Rufiyaa\n |________________________________________","mw":" | Languages: English / Chichewa; Chewa; Nyanja\n | Nationality: Malawian\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: MK Malawian Kwacha\n |________________________________________","mx":" | Languages: Spanish; Castilian\n | Nationality: Mexican\n | Region: Central America\n | Continent: North America\n | Currency: $ Mexican Peso\n |________________________________________","my":" | Languages: Malay / English\n | Nationality: Malaysian\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: RM Malaysian Ringgit\n |________________________________________","mz":" | Languages: Portuguese\n | Nationality: Mozambican\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: MTn Mozambican Metical\n |________________________________________","na":" | Languages: English / Afrikaans\n | Nationality: Namibian\n | Region: Southern Africa\n | Continent: Africa\n | Currency: $ Namibian Dollar\n |________________________________________","nc":" | Languages: French\n | Nationality: New Caledonian\n | Region: Melanesia\n | Continent: Australia\n | Currency: Fr Cfp Franc\n |________________________________________","ne":" | Languages: French\n | Nationality: Nigerian\n | Region: Western Africa\n | Continent: Africa\n | Currency: Fr West African Cfa Franc\n |________________________________________","nf":" | Languages: English\n | Nationality: Norfolk Islander\n | Region: Australia and New Zealand\n | Continent: Australia\n | Currency: $ Australian Dollar\n |________________________________________","ng":" | Languages: English\n | Nationality: Nigerian\n | Region: Western Africa\n | Continent: Africa\n | Currency: โ‚ฆ Nigerian Naira\n |________________________________________","ni":" | Languages: Spanish; Castilian\n | Nationality: Nicaraguan\n | Region: Central America\n | Continent: North America\n | Currency: C$ Nicaraguan Cรณrdoba\n |________________________________________","nl":" | Languages: Dutch; Flemish\n | Nationality: Dutch\n | Region: Western Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","no":" | Languages: Bokmรฅl, Norwegian; Norwegian Bokmรฅl / Norwegian Nynorsk; Nynorsk, Norwegian\n | Nationality: Norwegian\n | Region: Northern Europe\n | Continent: Europe\n | Currency: kr Norwegian Krone\n |________________________________________","np":" | Languages: Nepali\n | Nationality: Nepalese\n | Region: Southern Asia\n | Continent: Asia\n | Currency: Rs. Nepalese Rupee\n |________________________________________","nr":" | Languages: English / Nauru\n | Nationality: Nauruan\n | Region: Micronesia\n | Continent: Australia\n | Currency: $ Australian Dollar\n |________________________________________","nu":" | Languages: English\n | Nationality: Niuean\n | Region: Polynesia\n | Continent: Australia\n | Currency: $ New Zealand Dollar\n |________________________________________","nz":" | Languages: English\n | Nationality: New Zealander\n | Region: Australia and New Zealand\n | Continent: Australia\n | Currency: $ New Zealand Dollar\n |________________________________________","om":" | Languages: Arabic\n | Nationality: Omani\n | Region: Western Asia\n | Continent: Asia\n | Currency: ุฑ.ุน. Omani Rial\n |________________________________________","pa":" | Languages: Spanish; Castilian\n | Nationality: Panamanian\n | Region: Central America\n | Continent: North America\n | Currency: B/. Panamanian Balboa\n |________________________________________","pe":" | Languages: Spanish; Castilian\n | Nationality: Peruvian\n | Region: South America\n | Continent: South America\n | Currency: S/ Peruvian Sol\n |________________________________________","pf":" | Languages: French\n | Nationality: French Polynesian\n | Region: Polynesia\n | Continent: Australia\n | Currency: Fr Cfp Franc\n |________________________________________","pg":" | Languages: English\n | Nationality: Papua New Guinean\n | Region: Melanesia\n | Continent: Australia\n | Currency: K Papua New Guinean Kina\n |________________________________________","ph":" | Languages: Tagalog / English\n | Nationality: Filipino\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: โ‚ฑ Philippine Peso\n |________________________________________","pk":" | Languages: English / Urdu\n | Nationality: Pakistani\n | Region: Southern Asia\n | Continent: Asia\n | Currency: โ‚จ Pakistani Rupee\n |________________________________________","pl":" | Languages: Polish\n | Nationality: Polish\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: zล‚ Polish Zล‚oty\n |________________________________________","pm":" | Languages: French\n | Nationality: French\n | Region: Northern America\n | Continent: North America\n | Currency: โ‚ฌ Euro\n |________________________________________","pn":" | Languages: English\n | Nationality: Pitcairn Islander\n | Region: Polynesia\n | Continent: Australia\n | Currency: $ New Zealand Dollar\n |________________________________________","pr":" | Languages: Spanish; Castilian / English\n | Nationality: Puerto Rican\n | Region: Caribbean\n | Continent: North America\n | Currency: $ United States Dollar\n |________________________________________","ps":" | Languages: Arabic / Hebrew / English\n | Nationality: Palestinian\n | Region: Western Asia\n | Continent: Asia\n | Currency: โ‚ช Israeli New Sheqel\n |________________________________________","pt":" | Languages: Portuguese\n | Nationality: Portuguese\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","pw":" | Languages: English\n | Nationality: Palauan\n | Region: Micronesia\n | Continent: Australia\n | Currency: $ United States Dollar\n |________________________________________","py":" | Languages: Spanish; Castilian / Guarani\n | Nationality: Paraguayan\n | Region: South America\n | Continent: South America\n | Currency: โ‚ฒ Paraguayan Guaranรญ\n |________________________________________","qa":" | Languages: Arabic\n | Nationality: Qatari\n | Region: Western Asia\n | Continent: Asia\n | Currency: ุฑ.ู‚ Qatari Riyal\n |________________________________________","re":" | Languages: French\n | Nationality: French\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: โ‚ฌ Euro\n |________________________________________","ro":" | Languages: Romanian; Moldavian; Moldovan\n | Nationality: Romanian\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: Lei Romanian Leu\n |________________________________________","rs":" | Languages: Serbian\n | Nationality: Serbian\n | Region: Southern Europe\n | Continent: Europe\n | Currency: ะ ะกะ” Serbian Dinar\n |________________________________________","ru":" | Languages: Russian\n | Nationality: Russian\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: โ‚ฝ Russian Ruble\n |________________________________________","rw":" | Languages: Kinyarwanda / English / French\n | Nationality: Rwandan\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: FRw Rwandan Franc\n |________________________________________","sa":" | Languages: Arabic\n | Nationality: Saudi Arabian\n | Region: Western Asia\n | Continent: Asia\n | Currency: ุฑ.ุณ Saudi Riyal\n |________________________________________","sb":" | Languages: English\n | Nationality: Solomon Islander\n | Region: Melanesia\n | Continent: Australia\n | Currency: $ Solomon Islands Dollar\n |________________________________________","sc":" | Languages: French / English\n | Nationality: Seychellois\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: โ‚จ Seychellois Rupee\n |________________________________________","sd":" | Languages: Arabic / English\n | Nationality: Sudanese\n | Region: Northern Africa\n | Continent: Africa\n | Currency: ยฃ Sudanese Pound\n |________________________________________","se":" | Languages: Swedish\n | Nationality: Swedish\n | Region: Northern Europe\n | Continent: Europe\n | Currency: kr Swedish Krona\n |________________________________________","sg":" | Languages: English / Malay / Tamil\n | Nationality: Singaporean\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: $ Singapore Dollar\n |________________________________________","sh":" | Languages: English\n | Nationality: Saint Helenian\n | Region: Western Africa\n | Continent: Africa\n | Currency: ยฃ Saint Helenian Pound\n |________________________________________","si":" | Languages: Slovenian\n | Nationality: Slovene\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","sj":" | Languages: Norwegian\n | Nationality: Norwegian\n | Region: Northern Europe\n | Continent: Europe\n | Currency: kr Norwegian Krone\n |________________________________________","sk":" | Languages: Slovak\n | Nationality: Slovak\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","sl":" | Languages: English\n | Nationality: Sierra Leonean\n | Region: Western Africa\n | Continent: Africa\n | Currency: Le Sierra Leonean Leone\n |________________________________________","sm":" | Languages: Italian\n | Nationality: Sammarinese\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","sn":" | Languages: French\n | Nationality: Senegalese\n | Region: Western Africa\n | Continent: Africa\n | Currency: Fr West African Cfa Franc\n |________________________________________","so":" | Languages: Somali / Arabic\n | Nationality: Somali\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: Sh Somali Shilling\n |________________________________________","sr":" | Languages: Dutch; Flemish\n | Nationality: Surinamer\n | Region: South America\n | Continent: South America\n | Currency: $ Surinamese Dollar\n |________________________________________","ss":" | Languages: Arabic / English\n | Nationality: South Sudanese\n | Region: Northern Africa\n | Continent: Africa\n | Currency: ยฃ South Sudanese Pound\n |________________________________________","st":" | Languages: Portuguese\n | Nationality: Sao Tomean\n | Region: Middle Africa\n | Continent: Africa\n | Currency: Db Sรฃo Tomรฉ and Prรญncipe Dobra\n |________________________________________","sv":" | Languages: Spanish; Castilian\n | Nationality: Salvadoran\n | Region: Central America\n | Continent: North America\n | Currency: $ United States Dollar\n |________________________________________","sx":" | Languages: Dutch; Flemish / English\n | Nationality: Dutch\n | Region: Caribbean\n | Continent: North America\n | Currency: ฦ’ Netherlands Antillean Gulden\n |________________________________________","sy":" | Languages: Arabic\n | Nationality: Syrian\n | Region: Western Asia\n | Continent: Asia\n | Currency: ยฃS Syrian Pound\n |________________________________________","sz":" | Languages: English / Swati\n | Nationality: Swazi\n | Region: Southern Africa\n | Continent: Africa\n | Currency: E Swazi Lilangeni\n |________________________________________","tc":" | Languages: English\n | Nationality: Turks and Caicos Islander\n | Region: Caribbean\n | Continent: North America\n | Currency: $ United States Dollar\n |________________________________________","td":" | Languages: Arabic / French\n | Nationality: Chadian\n | Region: Middle Africa\n | Continent: Africa\n | Currency: CFA Central African Cfa Franc\n |________________________________________","tf":" | Languages: French\n | Nationality: French\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: โ‚ฌ Euro\n |________________________________________","tg":" | Languages: French\n | Nationality: Togolese\n | Region: Western Africa\n | Continent: Africa\n | Currency: Fr West African Cfa Franc\n |________________________________________","th":" | Languages: Thai\n | Nationality: Thai\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: เธฟ Thai Baht\n |________________________________________","tj":" | Languages: Tajik / Russian\n | Nationality: Tadzhik\n | Region: Central Asia\n | Continent: Asia\n | Currency: ะ…ะœ Tajikistani Somoni\n |________________________________________","tk":" | Languages: English\n | Nationality: Tokelauan\n | Region: Polynesia\n | Continent: Australia\n | Currency: $ New Zealand Dollar\n |________________________________________","tl":" | Languages: Portuguese\n | Nationality: East Timorese\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: Rp Indonesian Rupiah\n |________________________________________","tm":" | Languages: Turkmen\n | Nationality: Turkmen\n | Region: Central Asia\n | Continent: Asia\n | Currency: T Turkmenistani Manat\n |________________________________________","tn":" | Languages: Arabic / French\n | Nationality: Tunisian\n | Region: Northern Africa\n | Continent: Africa\n | Currency: ุฏ.ุช Tunisian Dinar\n |________________________________________","to":" | Languages: English / Tonga (Tonga Islands)\n | Nationality: Tongan\n | Region: Polynesia\n | Continent: Australia\n | Currency: T$ Tongan Paสปanga\n |________________________________________","tr":" | Languages: Turkish\n | Nationality: Turkish\n | Region: Western Asia\n | Continent: Europe\n | Currency: โ‚บ Turkish Lira\n |________________________________________","tt":" | Languages: English\n | Nationality: Trinidadian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ Trinidad and Tobago Dollar\n |________________________________________","tv":" | Languages: English\n | Nationality: Tuvaluan\n | Region: Polynesia\n | Continent: Australia\n | Currency: $ Australian Dollar\n |________________________________________","tw":" | Languages: Chinese\n | Nationality: Taiwanese\n | Region: Eastern Asia\n | Continent: Asia\n | Currency: $ New Taiwan Dollar\n |________________________________________","tz":" | Languages: Swahili / English\n | Nationality: Tanzanian\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: Sh Tanzanian Shilling\n |________________________________________","ua":" | Languages: Ukrainian\n | Nationality: Ukrainian\n | Region: Eastern Europe\n | Continent: Europe\n | Currency: โ‚ด Ukrainian Hryvnia\n |________________________________________","ug":" | Languages: English / Swahili\n | Nationality: Ugandan\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: USh Ugandan Shilling\n |________________________________________","um":" | Languages: English\n | Nationality: American\n | Region: Northern America\n | Continent: Australia\n | Currency: $ United States Dollar\n |________________________________________","us":" | Languages: English\n | Nationality: American\n | Region: Northern America\n | Continent: North America\n | Currency: $ United States Dollar\n |________________________________________","uy":" | Languages: Spanish; Castilian\n | Nationality: Uruguayan\n | Region: South America\n | Continent: South America\n | Currency: $U Uruguayan Peso\n |________________________________________","uz":" | Languages: Uzbek / Russian\n | Nationality: Uzbekistani\n | Region: Central Asia\n | Continent: Asia\n | Currency: so'm Uzbekistan Som\n |________________________________________","va":" | Languages: Italian / Latin\n | Nationality: Italian\n | Region: Southern Europe\n | Continent: Europe\n | Currency: โ‚ฌ Euro\n |________________________________________","vc":" | Languages: English\n | Nationality: Saint Vincentian\n | Region: Caribbean\n | Continent: North America\n | Currency: $ East Caribbean Dollar\n |________________________________________","ve":" | Languages: Spanish; Castilian\n | Nationality: Venezuelan\n | Region: South America\n | Continent: South America\n | Currency: Bs Venezuelan Bolรญvar Soberano\n |________________________________________","vg":" | Languages: English\n | Nationality: Virgin Islander\n | Region: Caribbean\n | Continent: North America\n | Currency: $ United States Dollar\n |________________________________________","vi":" | Languages: English\n | Nationality: Virgin Islander\n | Region: Caribbean\n | Continent: North America\n | Currency: $ United States Dollar\n |________________________________________","vn":" | Languages: Vietnamese\n | Nationality: Vietnamese\n | Region: South-Eastern Asia\n | Continent: Asia\n | Currency: โ‚ซ Vietnamese ฤแป“ng\n |________________________________________","vu":" | Languages: Bislama / English / French\n | Nationality: Ni-Vanuatu\n | Region: Melanesia\n | Continent: Australia\n | Currency: Vt Vanuatu Vatu\n |________________________________________","wf":" | Languages: French\n | Nationality: Wallis and Futuna Islander\n | Region: Polynesia\n | Continent: Australia\n | Currency: Fr Cfp Franc\n |________________________________________","ws":" | Languages: Samoan / English\n | Nationality: Samoan\n | Region: Polynesia\n | Continent: Australia\n | Currency: T Samoan Tala\n |________________________________________","ye":" | Languages: Arabic\n | Nationality: Yemeni\n | Region: Western Asia\n | Continent: Asia\n | Currency: ๏ทผ Yemeni Rial\n |________________________________________","yt":" | Languages: French\n | Nationality: French\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: โ‚ฌ Euro\n |________________________________________","za":" | Languages: Afrikaans / English / Ndebele, South; South Ndebele / Sotho, Southern\n | Nationality: South African\n | Region: Southern Africa\n | Continent: Africa\n | Currency: R South African Rand\n |________________________________________","zm":" | Languages: English\n | Nationality: Zambian\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: K Zambian Kwacha\n |________________________________________","zw":" | Languages: English / Shona / Ndebele, North; North Ndebele\n | Nationality: Zimbabwean\n | Region: Eastern Africa\n | Continent: Africa\n | Currency: $ United States Dollar\n |________________________________________"} \ No newline at end of file diff --git a/cache/formatted_output/one_line_country.json b/cache/formatted_output/one_line_country.json new file mode 100644 index 0000000..7d0986e --- /dev/null +++ b/cache/formatted_output/one_line_country.json @@ -0,0 +1 @@ +{"ad":"(๐Ÿ‡ฆ๐Ÿ‡ฉ | 020 | AD | AND | Andorra)","ae":"(๐Ÿ‡ฆ๐Ÿ‡ช | 784 | AE | ARE | United Arab Emirates)","af":"(๐Ÿ‡ฆ๐Ÿ‡ซ | 004 | AF | AFG | Afghanistan)","ag":"(๐Ÿ‡ฆ๐Ÿ‡ฌ | 028 | AG | ATG | Antigua and Barbuda)","ai":"(๐Ÿ‡ฆ๐Ÿ‡ฎ | 660 | AI | AIA | Anguilla)","al":"(๐Ÿ‡ฆ๐Ÿ‡ฑ | 008 | AL | ALB | Albania)","am":"(๐Ÿ‡ฆ๐Ÿ‡ฒ | 051 | AM | ARM | Armenia)","ao":"(๐Ÿ‡ฆ๐Ÿ‡ด | 024 | AO | AGO | Angola)","aq":"(๐Ÿ‡ฆ๐Ÿ‡ถ | 010 | AQ | ATA | Antarctica)","ar":"(๐Ÿ‡ฆ๐Ÿ‡ท | 032 | AR | ARG | Argentina)","as":"(๐Ÿ‡ฆ๐Ÿ‡ธ | 016 | AS | ASM | American Samoa)","at":"(๐Ÿ‡ฆ๐Ÿ‡น | 040 | AT | AUT | Austria)","au":"(๐Ÿ‡ฆ๐Ÿ‡บ | 036 | AU | AUS | Australia)","aw":"(๐Ÿ‡ฆ๐Ÿ‡ผ | 533 | AW | ABW | Aruba)","ax":"(๐Ÿ‡ฆ๐Ÿ‡ฝ | 248 | AX | ALA | ร…land Islands)","az":"(๐Ÿ‡ฆ๐Ÿ‡ฟ | 031 | AZ | AZE | Azerbaijan)","ba":"(๐Ÿ‡ง๐Ÿ‡ฆ | 070 | BA | BIH | Bosnia and Herzegovina)","bb":"(๐Ÿ‡ง๐Ÿ‡ง | 052 | BB | BRB | Barbados)","bd":"(๐Ÿ‡ง๐Ÿ‡ฉ | 050 | BD | BGD | Bangladesh)","be":"(๐Ÿ‡ง๐Ÿ‡ช | 056 | BE | BEL | Belgium)","bf":"(๐Ÿ‡ง๐Ÿ‡ซ | 854 | BF | BFA | Burkina Faso)","bg":"(๐Ÿ‡ง๐Ÿ‡ฌ | 100 | BG | BGR | Bulgaria)","bh":"(๐Ÿ‡ง๐Ÿ‡ญ | 048 | BH | BHR | Bahrain)","bi":"(๐Ÿ‡ง๐Ÿ‡ฎ | 108 | BI | BDI | Burundi)","bj":"(๐Ÿ‡ง๐Ÿ‡ฏ | 204 | BJ | BEN | Benin)","bl":"(๐Ÿ‡ง๐Ÿ‡ฑ | 652 | BL | BLM | Saint Barthรฉlemy)","bm":"(๐Ÿ‡ง๐Ÿ‡ฒ | 060 | BM | BMU | Bermuda)","bn":"(๐Ÿ‡ง๐Ÿ‡ณ | 096 | BN | BRN | Brunei Darussalam)","bo":"(๐Ÿ‡ง๐Ÿ‡ด | 068 | BO | BOL | Bolivia (Plurinational State of))","bq":"(๐Ÿ‡ง๐Ÿ‡ถ | 535 | BQ | BES | Bonaire, Sint Eustatius and Saba)","br":"(๐Ÿ‡ง๐Ÿ‡ท | 076 | BR | BRA | Brazil)","bs":"(๐Ÿ‡ง๐Ÿ‡ธ | 044 | BS | BHS | Bahamas)","bt":"(๐Ÿ‡ง๐Ÿ‡น | 064 | BT | BTN | Bhutan)","bv":"(๐Ÿ‡ง๐Ÿ‡ป | 074 | BV | BVT | Bouvet Island)","bw":"(๐Ÿ‡ง๐Ÿ‡ผ | 072 | BW | BWA | Botswana)","by":"(๐Ÿ‡ง๐Ÿ‡พ | 112 | BY | BLR | Belarus)","bz":"(๐Ÿ‡ง๐Ÿ‡ฟ | 084 | BZ | BLZ | Belize)","ca":"(๐Ÿ‡จ๐Ÿ‡ฆ | 124 | CA | CAN | Canada)","cc":"(๐Ÿ‡จ๐Ÿ‡จ | 166 | CC | CCK | Cocos (Keeling) Islands)","cd":"(๐Ÿ‡จ๐Ÿ‡ฉ | 180 | CD | COD | Congo (Democratic Republic of the))","cf":"(๐Ÿ‡จ๐Ÿ‡ซ | 140 | CF | CAF | Central African Republic)","cg":"(๐Ÿ‡จ๐Ÿ‡ฌ | 178 | CG | COG | Congo)","ch":"(๐Ÿ‡จ๐Ÿ‡ญ | 756 | CH | CHE | Switzerland)","ci":"(๐Ÿ‡จ๐Ÿ‡ฎ | 384 | CI | CIV | Cรดte d'Ivoire)","ck":"(๐Ÿ‡จ๐Ÿ‡ฐ | 184 | CK | COK | Cook Islands)","cl":"(๐Ÿ‡จ๐Ÿ‡ฑ | 152 | CL | CHL | Chile)","cm":"(๐Ÿ‡จ๐Ÿ‡ฒ | 120 | CM | CMR | Cameroon)","cn":"(๐Ÿ‡จ๐Ÿ‡ณ | 156 | CN | CHN | China)","co":"(๐Ÿ‡จ๐Ÿ‡ด | 170 | CO | COL | Colombia)","cr":"(๐Ÿ‡จ๐Ÿ‡ท | 188 | CR | CRI | Costa Rica)","cu":"(๐Ÿ‡จ๐Ÿ‡บ | 192 | CU | CUB | Cuba)","cv":"(๐Ÿ‡จ๐Ÿ‡ป | 132 | CV | CPV | Cabo Verde)","cw":"(๐Ÿ‡จ๐Ÿ‡ผ | 531 | CW | CUW | Curaรงao)","cx":"(๐Ÿ‡จ๐Ÿ‡ฝ | 162 | CX | CXR | Christmas Island)","cy":"(๐Ÿ‡จ๐Ÿ‡พ | 196 | CY | CYP | Cyprus)","cz":"(๐Ÿ‡จ๐Ÿ‡ฟ | 203 | CZ | CZE | Czechia)","de":"(๐Ÿ‡ฉ๐Ÿ‡ช | 276 | DE | DEU | Germany)","dj":"(๐Ÿ‡ฉ๐Ÿ‡ฏ | 262 | DJ | DJI | Djibouti)","dk":"(๐Ÿ‡ฉ๐Ÿ‡ฐ | 208 | DK | DNK | Denmark)","dm":"(๐Ÿ‡ฉ๐Ÿ‡ฒ | 212 | DM | DMA | Dominica)","do":"(๐Ÿ‡ฉ๐Ÿ‡ด | 214 | DO | DOM | Dominican Republic)","dz":"(๐Ÿ‡ฉ๐Ÿ‡ฟ | 012 | DZ | DZA | Algeria)","ec":"(๐Ÿ‡ช๐Ÿ‡จ | 218 | EC | ECU | Ecuador)","ee":"(๐Ÿ‡ช๐Ÿ‡ช | 233 | EE | EST | Estonia)","eg":"(๐Ÿ‡ช๐Ÿ‡ฌ | 818 | EG | EGY | Egypt)","eh":"(๐Ÿ‡ช๐Ÿ‡ญ | 732 | EH | ESH | Western Sahara)","er":"(๐Ÿ‡ช๐Ÿ‡ท | 232 | ER | ERI | Eritrea)","es":"(๐Ÿ‡ช๐Ÿ‡ธ | 724 | ES | ESP | Spain)","et":"(๐Ÿ‡ช๐Ÿ‡น | 231 | ET | ETH | Ethiopia)","fi":"(๐Ÿ‡ซ๐Ÿ‡ฎ | 246 | FI | FIN | Finland)","fj":"(๐Ÿ‡ซ๐Ÿ‡ฏ | 242 | FJ | FJI | Fiji)","fk":"(๐Ÿ‡ซ๐Ÿ‡ฐ | 238 | FK | FLK | Falkland Islands (Malvinas))","fm":"(๐Ÿ‡ซ๐Ÿ‡ฒ | 583 | FM | FSM | Micronesia (Federated States of))","fo":"(๐Ÿ‡ซ๐Ÿ‡ด | 234 | FO | FRO | Faroe Islands)","fr":"(๐Ÿ‡ซ๐Ÿ‡ท | 250 | FR | FRA | France)","ga":"(๐Ÿ‡ฌ๐Ÿ‡ฆ | 266 | GA | GAB | Gabon)","gb":"(๐Ÿ‡ฌ๐Ÿ‡ง | 826 | GB | GBR | United Kingdom of Great Britain and Northern Ireland)","gd":"(๐Ÿ‡ฌ๐Ÿ‡ฉ | 308 | GD | GRD | Grenada)","ge":"(๐Ÿ‡ฌ๐Ÿ‡ช | 268 | GE | GEO | Georgia)","gf":"(๐Ÿ‡ฌ๐Ÿ‡ซ | 254 | GF | GUF | French Guiana)","gg":"(๐Ÿ‡ฌ๐Ÿ‡ฌ | 831 | GG | GGY | Guernsey)","gh":"(๐Ÿ‡ฌ๐Ÿ‡ญ | 288 | GH | GHA | Ghana)","gi":"(๐Ÿ‡ฌ๐Ÿ‡ฎ | 292 | GI | GIB | Gibraltar)","gl":"(๐Ÿ‡ฌ๐Ÿ‡ฑ | 304 | GL | GRL | Greenland)","gm":"(๐Ÿ‡ฌ๐Ÿ‡ฒ | 270 | GM | GMB | Gambia)","gn":"(๐Ÿ‡ฌ๐Ÿ‡ณ | 324 | GN | GIN | Guinea)","gp":"(๐Ÿ‡ฌ๐Ÿ‡ต | 312 | GP | GLP | Guadeloupe)","gq":"(๐Ÿ‡ฌ๐Ÿ‡ถ | 226 | GQ | GNQ | Equatorial Guinea)","gr":"(๐Ÿ‡ฌ๐Ÿ‡ท | 300 | GR | GRC | Greece)","gs":"(๐Ÿ‡ฌ๐Ÿ‡ธ | 239 | GS | SGS | South Georgia and the South Sandwich Islands)","gt":"(๐Ÿ‡ฌ๐Ÿ‡น | 320 | GT | GTM | Guatemala)","gu":"(๐Ÿ‡ฌ๐Ÿ‡บ | 316 | GU | GUM | Guam)","gw":"(๐Ÿ‡ฌ๐Ÿ‡ผ | 624 | GW | GNB | Guinea-Bissau)","gy":"(๐Ÿ‡ฌ๐Ÿ‡พ | 328 | GY | GUY | Guyana)","hk":"(๐Ÿ‡ญ๐Ÿ‡ฐ | 344 | HK | HKG | Hong Kong)","hm":"(๐Ÿ‡ญ๐Ÿ‡ฒ | 334 | HM | HMD | Heard Island and McDonald Islands)","hn":"(๐Ÿ‡ญ๐Ÿ‡ณ | 340 | HN | HND | Honduras)","hr":"(๐Ÿ‡ญ๐Ÿ‡ท | 191 | HR | HRV | Croatia)","ht":"(๐Ÿ‡ญ๐Ÿ‡น | 332 | HT | HTI | Haiti)","hu":"(๐Ÿ‡ญ๐Ÿ‡บ | 348 | HU | HUN | Hungary)","id":"(๐Ÿ‡ฎ๐Ÿ‡ฉ | 360 | ID | IDN | Indonesia)","ie":"(๐Ÿ‡ฎ๐Ÿ‡ช | 372 | IE | IRL | Ireland)","il":"(๐Ÿ‡ฎ๐Ÿ‡ฑ | 376 | IL | ISR | Israel)","im":"(๐Ÿ‡ฎ๐Ÿ‡ฒ | 833 | IM | IMN | Isle of Man)","in":"(๐Ÿ‡ฎ๐Ÿ‡ณ | 356 | IN | IND | India)","io":"(๐Ÿ‡ฎ๐Ÿ‡ด | 086 | IO | IOT | British Indian Ocean Territory)","iq":"(๐Ÿ‡ฎ๐Ÿ‡ถ | 368 | IQ | IRQ | Iraq)","ir":"(๐Ÿ‡ฎ๐Ÿ‡ท | 364 | IR | IRN | Iran (Islamic Republic of))","is":"(๐Ÿ‡ฎ๐Ÿ‡ธ | 352 | IS | ISL | Iceland)","it":"(๐Ÿ‡ฎ๐Ÿ‡น | 380 | IT | ITA | Italy)","je":"(๐Ÿ‡ฏ๐Ÿ‡ช | 832 | JE | JEY | Jersey)","jm":"(๐Ÿ‡ฏ๐Ÿ‡ฒ | 388 | JM | JAM | Jamaica)","jo":"(๐Ÿ‡ฏ๐Ÿ‡ด | 400 | JO | JOR | Jordan)","jp":"(๐Ÿ‡ฏ๐Ÿ‡ต | 392 | JP | JPN | Japan)","ke":"(๐Ÿ‡ฐ๐Ÿ‡ช | 404 | KE | KEN | Kenya)","kg":"(๐Ÿ‡ฐ๐Ÿ‡ฌ | 417 | KG | KGZ | Kyrgyzstan)","kh":"(๐Ÿ‡ฐ๐Ÿ‡ญ | 116 | KH | KHM | Cambodia)","ki":"(๐Ÿ‡ฐ๐Ÿ‡ฎ | 296 | KI | KIR | Kiribati)","km":"(๐Ÿ‡ฐ๐Ÿ‡ฒ | 174 | KM | COM | Comoros)","kn":"(๐Ÿ‡ฐ๐Ÿ‡ณ | 659 | KN | KNA | Saint Kitts and Nevis)","kp":"(๐Ÿ‡ฐ๐Ÿ‡ต | 408 | KP | PRK | Korea (Democratic People's Republic of))","kr":"(๐Ÿ‡ฐ๐Ÿ‡ท | 410 | KR | KOR | Korea (Republic of))","kw":"(๐Ÿ‡ฐ๐Ÿ‡ผ | 414 | KW | KWT | Kuwait)","ky":"(๐Ÿ‡ฐ๐Ÿ‡พ | 136 | KY | CYM | Cayman Islands)","kz":"(๐Ÿ‡ฐ๐Ÿ‡ฟ | 398 | KZ | KAZ | Kazakhstan)","la":"(๐Ÿ‡ฑ๐Ÿ‡ฆ | 418 | LA | LAO | Lao People's Democratic Republic)","lb":"(๐Ÿ‡ฑ๐Ÿ‡ง | 422 | LB | LBN | Lebanon)","lc":"(๐Ÿ‡ฑ๐Ÿ‡จ | 662 | LC | LCA | Saint Lucia)","li":"(๐Ÿ‡ฑ๐Ÿ‡ฎ | 438 | LI | LIE | Liechtenstein)","lk":"(๐Ÿ‡ฑ๐Ÿ‡ฐ | 144 | LK | LKA | Sri Lanka)","lr":"(๐Ÿ‡ฑ๐Ÿ‡ท | 430 | LR | LBR | Liberia)","ls":"(๐Ÿ‡ฑ๐Ÿ‡ธ | 426 | LS | LSO | Lesotho)","lt":"(๐Ÿ‡ฑ๐Ÿ‡น | 440 | LT | LTU | Lithuania)","lu":"(๐Ÿ‡ฑ๐Ÿ‡บ | 442 | LU | LUX | Luxembourg)","lv":"(๐Ÿ‡ฑ๐Ÿ‡ป | 428 | LV | LVA | Latvia)","ly":"(๐Ÿ‡ฑ๐Ÿ‡พ | 434 | LY | LBY | Libya)","ma":"(๐Ÿ‡ฒ๐Ÿ‡ฆ | 504 | MA | MAR | Morocco)","mc":"(๐Ÿ‡ฒ๐Ÿ‡จ | 492 | MC | MCO | Monaco)","md":"(๐Ÿ‡ฒ๐Ÿ‡ฉ | 498 | MD | MDA | Moldova (Republic of))","me":"(๐Ÿ‡ฒ๐Ÿ‡ช | 499 | ME | MNE | Montenegro)","mf":"(๐Ÿ‡ฒ๐Ÿ‡ซ | 663 | MF | MAF | Saint Martin (French part))","mg":"(๐Ÿ‡ฒ๐Ÿ‡ฌ | 450 | MG | MDG | Madagascar)","mh":"(๐Ÿ‡ฒ๐Ÿ‡ญ | 584 | MH | MHL | Marshall Islands)","mk":"(๐Ÿ‡ฒ๐Ÿ‡ฐ | 807 | MK | MKD | North Macedonia)","ml":"(๐Ÿ‡ฒ๐Ÿ‡ฑ | 466 | ML | MLI | Mali)","mm":"(๐Ÿ‡ฒ๐Ÿ‡ฒ | 104 | MM | MMR | Myanmar)","mn":"(๐Ÿ‡ฒ๐Ÿ‡ณ | 496 | MN | MNG | Mongolia)","mo":"(๐Ÿ‡ฒ๐Ÿ‡ด | 446 | MO | MAC | Macao)","mp":"(๐Ÿ‡ฒ๐Ÿ‡ต | 580 | MP | MNP | Northern Mariana Islands)","mq":"(๐Ÿ‡ฒ๐Ÿ‡ถ | 474 | MQ | MTQ | Martinique)","mr":"(๐Ÿ‡ฒ๐Ÿ‡ท | 478 | MR | MRT | Mauritania)","ms":"(๐Ÿ‡ฒ๐Ÿ‡ธ | 500 | MS | MSR | Montserrat)","mt":"(๐Ÿ‡ฒ๐Ÿ‡น | 470 | MT | MLT | Malta)","mu":"(๐Ÿ‡ฒ๐Ÿ‡บ | 480 | MU | MUS | Mauritius)","mv":"(๐Ÿ‡ฒ๐Ÿ‡ป | 462 | MV | MDV | Maldives)","mw":"(๐Ÿ‡ฒ๐Ÿ‡ผ | 454 | MW | MWI | Malawi)","mx":"(๐Ÿ‡ฒ๐Ÿ‡ฝ | 484 | MX | MEX | Mexico)","my":"(๐Ÿ‡ฒ๐Ÿ‡พ | 458 | MY | MYS | Malaysia)","mz":"(๐Ÿ‡ฒ๐Ÿ‡ฟ | 508 | MZ | MOZ | Mozambique)","na":"(๐Ÿ‡ณ๐Ÿ‡ฆ | 516 | NA | NAM | Namibia)","nc":"(๐Ÿ‡ณ๐Ÿ‡จ | 540 | NC | NCL | New Caledonia)","ne":"(๐Ÿ‡ณ๐Ÿ‡ช | 562 | NE | NER | Niger)","nf":"(๐Ÿ‡ณ๐Ÿ‡ซ | 574 | NF | NFK | Norfolk Island)","ng":"(๐Ÿ‡ณ๐Ÿ‡ฌ | 566 | NG | NGA | Nigeria)","ni":"(๐Ÿ‡ณ๐Ÿ‡ฎ | 558 | NI | NIC | Nicaragua)","nl":"(๐Ÿ‡ณ๐Ÿ‡ฑ | 528 | NL | NLD | Netherlands)","no":"(๐Ÿ‡ณ๐Ÿ‡ด | 578 | NO | NOR | Norway)","np":"(๐Ÿ‡ณ๐Ÿ‡ต | 524 | NP | NPL | Nepal)","nr":"(๐Ÿ‡ณ๐Ÿ‡ท | 520 | NR | NRU | Nauru)","nu":"(๐Ÿ‡ณ๐Ÿ‡บ | 570 | NU | NIU | Niue)","nz":"(๐Ÿ‡ณ๐Ÿ‡ฟ | 554 | NZ | NZL | New Zealand)","om":"(๐Ÿ‡ด๐Ÿ‡ฒ | 512 | OM | OMN | Oman)","pa":"(๐Ÿ‡ต๐Ÿ‡ฆ | 591 | PA | PAN | Panama)","pe":"(๐Ÿ‡ต๐Ÿ‡ช | 604 | PE | PER | Peru)","pf":"(๐Ÿ‡ต๐Ÿ‡ซ | 258 | PF | PYF | French Polynesia)","pg":"(๐Ÿ‡ต๐Ÿ‡ฌ | 598 | PG | PNG | Papua New Guinea)","ph":"(๐Ÿ‡ต๐Ÿ‡ญ | 608 | PH | PHL | Philippines)","pk":"(๐Ÿ‡ต๐Ÿ‡ฐ | 586 | PK | PAK | Pakistan)","pl":"(๐Ÿ‡ต๐Ÿ‡ฑ | 616 | PL | POL | Poland)","pm":"(๐Ÿ‡ต๐Ÿ‡ฒ | 666 | PM | SPM | Saint Pierre and Miquelon)","pn":"(๐Ÿ‡ต๐Ÿ‡ณ | 612 | PN | PCN | Pitcairn)","pr":"(๐Ÿ‡ต๐Ÿ‡ท | 630 | PR | PRI | Puerto Rico)","ps":"(๐Ÿ‡ต๐Ÿ‡ธ | 275 | PS | PSE | Palestine, State of)","pt":"(๐Ÿ‡ต๐Ÿ‡น | 620 | PT | PRT | Portugal)","pw":"(๐Ÿ‡ต๐Ÿ‡ผ | 585 | PW | PLW | Palau)","py":"(๐Ÿ‡ต๐Ÿ‡พ | 600 | PY | PRY | Paraguay)","qa":"(๐Ÿ‡ถ๐Ÿ‡ฆ | 634 | QA | QAT | Qatar)","re":"(๐Ÿ‡ท๐Ÿ‡ช | 638 | RE | REU | Rรฉunion)","ro":"(๐Ÿ‡ท๐Ÿ‡ด | 642 | RO | ROU | Romania)","rs":"(๐Ÿ‡ท๐Ÿ‡ธ | 688 | RS | SRB | Serbia)","ru":"(๐Ÿ‡ท๐Ÿ‡บ | 643 | RU | RUS | Russian Federation)","rw":"(๐Ÿ‡ท๐Ÿ‡ผ | 646 | RW | RWA | Rwanda)","sa":"(๐Ÿ‡ธ๐Ÿ‡ฆ | 682 | SA | SAU | Saudi Arabia)","sb":"(๐Ÿ‡ธ๐Ÿ‡ง | 090 | SB | SLB | Solomon Islands)","sc":"(๐Ÿ‡ธ๐Ÿ‡จ | 690 | SC | SYC | Seychelles)","sd":"(๐Ÿ‡ธ๐Ÿ‡ฉ | 729 | SD | SDN | Sudan)","se":"(๐Ÿ‡ธ๐Ÿ‡ช | 752 | SE | SWE | Sweden)","sg":"(๐Ÿ‡ธ๐Ÿ‡ฌ | 702 | SG | SGP | Singapore)","sh":"(๐Ÿ‡ธ๐Ÿ‡ญ | 654 | SH | SHN | Saint Helena, Ascension and Tristan da Cunha)","si":"(๐Ÿ‡ธ๐Ÿ‡ฎ | 705 | SI | SVN | Slovenia)","sj":"(๐Ÿ‡ธ๐Ÿ‡ฏ | 744 | SJ | SJM | Svalbard and Jan Mayen)","sk":"(๐Ÿ‡ธ๐Ÿ‡ฐ | 703 | SK | SVK | Slovakia)","sl":"(๐Ÿ‡ธ๐Ÿ‡ฑ | 694 | SL | SLE | Sierra Leone)","sm":"(๐Ÿ‡ธ๐Ÿ‡ฒ | 674 | SM | SMR | San Marino)","sn":"(๐Ÿ‡ธ๐Ÿ‡ณ | 686 | SN | SEN | Senegal)","so":"(๐Ÿ‡ธ๐Ÿ‡ด | 706 | SO | SOM | Somalia)","sr":"(๐Ÿ‡ธ๐Ÿ‡ท | 740 | SR | SUR | Suriname)","ss":"(๐Ÿ‡ธ๐Ÿ‡ธ | 728 | SS | SSD | South Sudan)","st":"(๐Ÿ‡ธ๐Ÿ‡น | 678 | ST | STP | Sao Tome and Principe)","sv":"(๐Ÿ‡ธ๐Ÿ‡ป | 222 | SV | SLV | El Salvador)","sx":"(๐Ÿ‡ธ๐Ÿ‡ฝ | 534 | SX | SXM | Sint Maarten (Dutch part))","sy":"(๐Ÿ‡ธ๐Ÿ‡พ | 760 | SY | SYR | Syrian Arab Republic)","sz":"(๐Ÿ‡ธ๐Ÿ‡ฟ | 748 | SZ | SWZ | Eswatini)","tc":"(๐Ÿ‡น๐Ÿ‡จ | 796 | TC | TCA | Turks and Caicos Islands)","td":"(๐Ÿ‡น๐Ÿ‡ฉ | 148 | TD | TCD | Chad)","tf":"(๐Ÿ‡น๐Ÿ‡ซ | 260 | TF | ATF | French Southern Territories)","tg":"(๐Ÿ‡น๐Ÿ‡ฌ | 768 | TG | TGO | Togo)","th":"(๐Ÿ‡น๐Ÿ‡ญ | 764 | TH | THA | Thailand)","tj":"(๐Ÿ‡น๐Ÿ‡ฏ | 762 | TJ | TJK | Tajikistan)","tk":"(๐Ÿ‡น๐Ÿ‡ฐ | 772 | TK | TKL | Tokelau)","tl":"(๐Ÿ‡น๐Ÿ‡ฑ | 626 | TL | TLS | Timor-Leste)","tm":"(๐Ÿ‡น๐Ÿ‡ฒ | 795 | TM | TKM | Turkmenistan)","tn":"(๐Ÿ‡น๐Ÿ‡ณ | 788 | TN | TUN | Tunisia)","to":"(๐Ÿ‡น๐Ÿ‡ด | 776 | TO | TON | Tonga)","tr":"(๐Ÿ‡น๐Ÿ‡ท | 792 | TR | TUR | Tรผrkiye)","tt":"(๐Ÿ‡น๐Ÿ‡น | 780 | TT | TTO | Trinidad and Tobago)","tv":"(๐Ÿ‡น๐Ÿ‡ป | 798 | TV | TUV | Tuvalu)","tw":"(๐Ÿ‡น๐Ÿ‡ผ | 158 | TW | TWN | Taiwan, Province of China)","tz":"(๐Ÿ‡น๐Ÿ‡ฟ | 834 | TZ | TZA | Tanzania, United Republic of)","ua":"(๐Ÿ‡บ๐Ÿ‡ฆ | 804 | UA | UKR | Ukraine)","ug":"(๐Ÿ‡บ๐Ÿ‡ฌ | 800 | UG | UGA | Uganda)","um":"(๐Ÿ‡บ๐Ÿ‡ฒ | 581 | UM | UMI | United States Minor Outlying Islands)","us":"(๐Ÿ‡บ๐Ÿ‡ธ | 840 | US | USA | United States of America)","uy":"(๐Ÿ‡บ๐Ÿ‡พ | 858 | UY | URY | Uruguay)","uz":"(๐Ÿ‡บ๐Ÿ‡ฟ | 860 | UZ | UZB | Uzbekistan)","va":"(๐Ÿ‡ป๐Ÿ‡ฆ | 336 | VA | VAT | Holy See)","vc":"(๐Ÿ‡ป๐Ÿ‡จ | 670 | VC | VCT | Saint Vincent and the Grenadines)","ve":"(๐Ÿ‡ป๐Ÿ‡ช | 862 | VE | VEN | Venezuela (Bolivarian Republic of))","vg":"(๐Ÿ‡ป๐Ÿ‡ฌ | 092 | VG | VGB | Virgin Islands (British))","vi":"(๐Ÿ‡ป๐Ÿ‡ฎ | 850 | VI | VIR | Virgin Islands (U.S.))","vn":"(๐Ÿ‡ป๐Ÿ‡ณ | 704 | VN | VNM | Viet Nam)","vu":"(๐Ÿ‡ป๐Ÿ‡บ | 548 | VU | VUT | Vanuatu)","wf":"(๐Ÿ‡ผ๐Ÿ‡ซ | 876 | WF | WLF | Wallis and Futuna)","ws":"(๐Ÿ‡ผ๐Ÿ‡ธ | 882 | WS | WSM | Samoa)","ye":"(๐Ÿ‡พ๐Ÿ‡ช | 887 | YE | YEM | Yemen)","yt":"(๐Ÿ‡พ๐Ÿ‡น | 175 | YT | MYT | Mayotte)","za":"(๐Ÿ‡ฟ๐Ÿ‡ฆ | 710 | ZA | ZAF | South Africa)","zm":"(๐Ÿ‡ฟ๐Ÿ‡ฒ | 894 | ZM | ZMB | Zambia)","zw":"(๐Ÿ‡ฟ๐Ÿ‡ผ | 716 | ZW | ZWE | Zimbabwe)"} \ No newline at end of file diff --git a/cache/formatted_output/one_line_currency.json b/cache/formatted_output/one_line_currency.json new file mode 100644 index 0000000..694da9f --- /dev/null +++ b/cache/formatted_output/one_line_currency.json @@ -0,0 +1 @@ +{"eur":"[EUR] โ‚ฌ Euro","aed":"[AED] ุฏ.ุฅ United Arab Emirates Dirham","afn":"[AFN] ุ‹ Afghan Afghani","xcd":"[XCD] $ East Caribbean Dollar","all":"[ALL] L Albanian Lek","amd":"[AMD] ีคึ€. Armenian Dram","aoa":"[AOA] Kz Angolan Kwanza","usd":"[USD] $ United States Dollar","ars":"[ARS] $ Argentine Peso","aud":"[AUD] $ Australian Dollar","awg":"[AWG] ฦ’ Aruban Florin","azn":"[AZN] โ‚ผ Azerbaijani Manat","bam":"[BAM] ะšะœ Bosnia and Herzegovina Convertible Mark","bbd":"[BBD] $ Barbadian Dollar","bdt":"[BDT] เงณ Bangladeshi Taka","xof":"[XOF] Fr West African Cfa Franc","bgn":"[BGN] ะปะฒ. Bulgarian Lev","bhd":"[BHD] ุฏ.ุจ Bahraini Dinar","bif":"[BIF] Fr Burundian Franc","bmd":"[BMD] $ Bermudian Dollar","bnd":"[BND] $ Brunei Dollar","bob":"[BOB] Bs. Bolivian Boliviano","brl":"[BRL] R$ Brazilian Real","bsd":"[BSD] $ Bahamian Dollar","btn":"[BTN] Nu. Bhutanese Ngultrum","nok":"[NOK] kr Norwegian Krone","bwp":"[BWP] P Botswana Pula","byn":"[BYN] Br Belarusian Ruble","bzd":"[BZD] $ Belize Dollar","cad":"[CAD] $ Canadian Dollar","cdf":"[CDF] Fr Congolese Franc","xaf":"[XAF] CFA Central African Cfa Franc","chf":"[CHF] CHF Swiss Franc","nzd":"[NZD] $ New Zealand Dollar","clp":"[CLP] $ Chilean Peso","cny":"[CNY] ยฅ Chinese Renminbi Yuan","cop":"[COP] $ Colombian Peso","crc":"[CRC] โ‚ก Costa Rican Colรณn","cup":"[CUP] $ Cuban Peso","cve":"[CVE] $ Cape Verdean Escudo","ang":"[ANG] ฦ’ Netherlands Antillean Gulden","czk":"[CZK] Kฤ Czech Koruna","djf":"[DJF] Fdj Djiboutian Franc","dkk":"[DKK] kr. Danish Krone","dop":"[DOP] $ Dominican Peso","dzd":"[DZD] ุฏ.ุฌ Algerian Dinar","egp":"[EGP] ุฌ.ู… Egyptian Pound","mad":"[MAD] ุฏ.ู…. Moroccan Dirham","etb":"[ETB] Br Ethiopian Birr","fjd":"[FJD] $ Fijian Dollar","fkp":"[FKP] ยฃ Falkland Pound","gbp":"[GBP] ยฃ British Pound","gel":"[GEL] แƒš Georgian Lari","ghs":"[GHS] โ‚ต Ghanaian Cedi","gip":"[GIP] ยฃ Gibraltar Pound","gmd":"[GMD] D Gambian Dalasi","gnf":"[GNF] Fr Guinean Franc","gtq":"[GTQ] Q Guatemalan Quetzal","gyd":"[GYD] $ Guyanese Dollar","hkd":"[HKD] $ Hong Kong Dollar","hnl":"[HNL] L Honduran Lempira","htg":"[HTG] G Haitian Gourde","huf":"[HUF] Ft Hungarian Forint","idr":"[IDR] Rp Indonesian Rupiah","ils":"[ILS] โ‚ช Israeli New Sheqel","inr":"[INR] โ‚น Indian Rupee","iqd":"[IQD] ุน.ุฏ Iraqi Dinar","irr":"[IRR] ๏ทผ Iranian Rial","isk":"[ISK] kr. Icelandic Krรณna","jmd":"[JMD] $ Jamaican Dollar","jod":"[JOD] ุฏ.ุง Jordanian Dinar","jpy":"[JPY] ยฅ Japanese Yen","kes":"[KES] KSh Kenyan Shilling","kgs":"[KGS] som Kyrgyzstani Som","khr":"[KHR] แŸ› Cambodian Riel","kmf":"[KMF] Fr Comorian Franc","kpw":"[KPW] โ‚ฉ North Korean Won","krw":"[KRW] โ‚ฉ South Korean Won","kwd":"[KWD] ุฏ.ูƒ Kuwaiti Dinar","kyd":"[KYD] $ Cayman Islands Dollar","kzt":"[KZT] โ‚ธ Kazakhstani Tenge","lak":"[LAK] โ‚ญ Lao Kip","lbp":"[LBP] ู„.ู„ Lebanese Pound","lkr":"[LKR] โ‚จ Sri Lankan Rupee","lrd":"[LRD] $ Liberian Dollar","lsl":"[LSL] L Lesotho Loti","lyd":"[LYD] ู„.ุฏ Libyan Dinar","mdl":"[MDL] L Moldovan Leu","mga":"[MGA] Ar Malagasy Ariary","mkd":"[MKD] ะดะตะฝ Macedonian Denar","mmk":"[MMK] K Myanmar Kyat","mnt":"[MNT] โ‚ฎ Mongolian Tรถgrรถg","mop":"[MOP] P Macanese Pataca","mru":"[MRU] UM Mauritanian Ouguiya","mur":"[MUR] โ‚จ Mauritian Rupee","mvr":"[MVR] MVR Maldivian Rufiyaa","mwk":"[MWK] MK Malawian Kwacha","mxn":"[MXN] $ Mexican Peso","myr":"[MYR] RM Malaysian Ringgit","mzn":"[MZN] MTn Mozambican Metical","nad":"[NAD] $ Namibian Dollar","xpf":"[XPF] Fr Cfp Franc","ngn":"[NGN] โ‚ฆ Nigerian Naira","nio":"[NIO] C$ Nicaraguan Cรณrdoba","npr":"[NPR] Rs. Nepalese Rupee","omr":"[OMR] ุฑ.ุน. Omani Rial","pab":"[PAB] B/. Panamanian Balboa","pen":"[PEN] S/ Peruvian Sol","pgk":"[PGK] K Papua New Guinean Kina","php":"[PHP] โ‚ฑ Philippine Peso","pkr":"[PKR] โ‚จ Pakistani Rupee","pln":"[PLN] zล‚ Polish Zล‚oty","pyg":"[PYG] โ‚ฒ Paraguayan Guaranรญ","qar":"[QAR] ุฑ.ู‚ Qatari Riyal","ron":"[RON] Lei Romanian Leu","rsd":"[RSD] ะ ะกะ” Serbian Dinar","rub":"[RUB] โ‚ฝ Russian Ruble","rwf":"[RWF] FRw Rwandan Franc","sar":"[SAR] ุฑ.ุณ Saudi Riyal","sbd":"[SBD] $ Solomon Islands Dollar","scr":"[SCR] โ‚จ Seychellois Rupee","sdg":"[SDG] ยฃ Sudanese Pound","sek":"[SEK] kr Swedish Krona","sgd":"[SGD] $ Singapore Dollar","shp":"[SHP] ยฃ Saint Helenian Pound","sll":"[SLL] Le Sierra Leonean Leone","sos":"[SOS] Sh Somali Shilling","srd":"[SRD] $ Surinamese Dollar","ssp":"[SSP] ยฃ South Sudanese Pound","std":"[STD] Db Sรฃo Tomรฉ and Prรญncipe Dobra","syp":"[SYP] ยฃS Syrian Pound","szl":"[SZL] E Swazi Lilangeni","thb":"[THB] เธฟ Thai Baht","tjs":"[TJS] ะ…ะœ Tajikistani Somoni","tmt":"[TMT] T Turkmenistani Manat","tnd":"[TND] ุฏ.ุช Tunisian Dinar","top":"[TOP] T$ Tongan Paสปanga","try":"[TRY] โ‚บ Turkish Lira","ttd":"[TTD] $ Trinidad and Tobago Dollar","twd":"[TWD] $ New Taiwan Dollar","tzs":"[TZS] Sh Tanzanian Shilling","uah":"[UAH] โ‚ด Ukrainian Hryvnia","ugx":"[UGX] USh Ugandan Shilling","uyu":"[UYU] $U Uruguayan Peso","uzs":"[UZS] so'm Uzbekistan Som","ves":"[VES] Bs Venezuelan Bolรญvar Soberano","vnd":"[VND] โ‚ซ Vietnamese ฤแป“ng","vuv":"[VUV] Vt Vanuatu Vatu","wst":"[WST] T Samoan Tala","yer":"[YER] ๏ทผ Yemeni Rial","zar":"[ZAR] R South African Rand","zmw":"[ZMW] K Zambian Kwacha"} \ No newline at end of file diff --git a/cache/list/README.md b/cache/list/README.md new file mode 100644 index 0000000..851af3d --- /dev/null +++ b/cache/list/README.md @@ -0,0 +1,61 @@ +# Cache: list + +--- + +## Item: list/all_countries.json + +### Content Sample +Sample of the first 20 pretty printed lines of the file. + +``` +[ + "ad", + "ae", + "af", + "ag", + "ai", + "al", + "am", + "ao", + "aq", + "ar", + "as", + "at", + "au", + "aw", + "ax", + "az", + "ba", + "bb", + "bd", +... +``` + +## Item: list/all_subregions.json + +### Content Sample +Sample of the first 20 pretty printed lines of the file. + +``` +[ + "australia and new zealand", + "caribbean", + "central america", + "central asia", + "eastern africa", + "eastern asia", + "eastern europe", + "melanesia", + "micronesia", + "middle africa", + "northern africa", + "northern america", + "northern europe", + "polynesia", + "south america", + "south-eastern asia", + "southern africa", + "southern asia", + "southern europe", +... +``` diff --git a/cache/list/all_countries.json b/cache/list/all_countries.json new file mode 100644 index 0000000..c15445c --- /dev/null +++ b/cache/list/all_countries.json @@ -0,0 +1 @@ +["ad","ae","af","ag","ai","al","am","ao","aq","ar","as","at","au","aw","ax","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bl","bm","bn","bo","bq","br","bs","bt","bv","bw","by","bz","ca","cc","cd","cf","cg","ch","ci","ck","cl","cm","cn","co","cr","cu","cv","cw","cx","cy","cz","de","dj","dk","dm","do","dz","ec","ee","eg","eh","er","es","et","fi","fj","fk","fm","fo","fr","ga","gb","gd","ge","gf","gg","gh","gi","gl","gm","gn","gp","gq","gr","gs","gt","gu","gw","gy","hk","hm","hn","hr","ht","hu","id","ie","il","im","in","io","iq","ir","is","it","je","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","ky","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","mc","md","me","mf","mg","mh","mk","ml","mm","mn","mo","mp","mq","mr","ms","mt","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","nl","no","np","nr","nu","nz","om","pa","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pt","pw","py","qa","re","ro","rs","ru","rw","sa","sb","sc","sd","se","sg","sh","si","sj","sk","sl","sm","sn","so","sr","ss","st","sv","sx","sy","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","to","tr","tt","tv","tw","tz","ua","ug","um","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wf","ws","ye","yt","za","zm","zw"] \ No newline at end of file diff --git a/cache/list/all_subregions.json b/cache/list/all_subregions.json new file mode 100644 index 0000000..45a4b53 --- /dev/null +++ b/cache/list/all_subregions.json @@ -0,0 +1 @@ +["australia and new zealand","caribbean","central america","central asia","eastern africa","eastern asia","eastern europe","melanesia","micronesia","middle africa","northern africa","northern america","northern europe","polynesia","south america","south-eastern asia","southern africa","southern asia","southern europe","western africa","western asia","western europe"] \ No newline at end of file diff --git a/lib/atlasq/command/any.rb b/lib/atlasq/command/any.rb index 6d7b66f..67f089c 100644 --- a/lib/atlasq/command/any.rb +++ b/lib/atlasq/command/any.rb @@ -8,10 +8,10 @@ class Any < Base def content search_terms.map do |term| if (country = Data.country(term)) - Format.country(country, term) - elsif (countries = Data.countries_by_region(term)) + Format.country(country) + elsif (country_codes = Data.countries_by_region(term)) region_name = Util::String.titleize(term) - Format.countries(countries, title: "Region: #{region_name}") + Format.countries(country_codes, title: "Region: #{region_name}") elsif (currencies = Data.countries_by_currencies(term)) Format.currencies(currencies) else diff --git a/lib/atlasq/command/base.rb b/lib/atlasq/command/base.rb index 85abac6..8e7372d 100644 --- a/lib/atlasq/command/base.rb +++ b/lib/atlasq/command/base.rb @@ -18,7 +18,7 @@ def self.to_pager? # @param search_terms [Array] def initialize(search_terms) - @search_terms = search_terms + @search_terms = search_terms.map(&Util::String.method(:normalize)) end # @return [String] diff --git a/lib/atlasq/command/country.rb b/lib/atlasq/command/country.rb index d3ad639..fba9076 100644 --- a/lib/atlasq/command/country.rb +++ b/lib/atlasq/command/country.rb @@ -8,17 +8,14 @@ class Country < Base # @return [String] def content if search_terms.empty? - countries = Data.all_countries - Format.countries(countries, title: "All Countries") + country_codes = Data.all_countries + Format.countries(country_codes, title: "All Countries") else search_terms.map do |term| - if (country = Data.country(term)) - Format.country(country, term) + if (country_code = Data.country(term)) + Format.country(country_code) elsif (country_codes = PartialMatch.countries(term)).any? - countries = country_codes.map do |code| - Data.country_by_code(code) - end - Format.countries(countries, title: "Countries (Partial Match)") + Format.countries(country_codes, title: "Countries (Partial Match)") else Atlasq.failed! "Unknown country: #{term}" diff --git a/lib/atlasq/command/region.rb b/lib/atlasq/command/region.rb index 6d2682f..1143fcc 100644 --- a/lib/atlasq/command/region.rb +++ b/lib/atlasq/command/region.rb @@ -11,9 +11,9 @@ def content Format.subregions(subregions) else search_terms.map do |term| - if (countries = Data.countries_by_region(term)) + if (country_codes = Data.countries_by_region(term)) region_name = Util::String.titleize(term) - Format.countries(countries, title: "Region: #{region_name}") + Format.countries(country_codes, title: "Region: #{region_name}") else Atlasq.failed! "Unknown region: #{term}" diff --git a/lib/atlasq/data.rb b/lib/atlasq/data.rb index 6e8825e..7db84c4 100644 --- a/lib/atlasq/data.rb +++ b/lib/atlasq/data.rb @@ -1,63 +1,41 @@ # frozen_string_literal: true -require "countries" -require "iso-639" -require "money" - -# Needed to allow us to access the `ISO3166::Country#currency` -# object which ends up being an instance of `Money::Currency`. -ISO3166.configure(&:enable_currency_extension!) - module Atlasq module Data - autoload :Currency, "atlasq/data/currency" - - # @param term [String] - # @return [ISO3166::Country, nil] + # @param term [String] search term + # @return [String, nil] ISO3166 2 letter country code def self.country(term) Cache .get("search_index/direct_match_country.json") - .dig(Util::String.normalize(term)) - &.then { |key| ISO3166::Country.new(key) } + .dig(term) end - # @param code [String] alpha2 country code - # @return [ISO3166::Country, nil] - def self.country_by_code(code) - ISO3166::Country.find_country_by_alpha2(code) + # @param term [String] search term + # @return [Array, nil] ISO3166 2 letter country codes + def self.countries_by_region(term) + Cache + .get("search_index/countries_by_region.json") + .dig(term) end - # @return [Array] + # @return [Array] ISO3166 2 letter country codes def self.all_countries - @all_countries ||= ISO3166::Country.all + Cache.get("list/all_countries.json") end - # @param term [String] - # @return [Array, nil] - def self.countries_by_region(term) + # @return [Array] + def self.all_subregions + subregions = Cache.get("list/all_subregions.json") + Cache .get("search_index/countries_by_region.json") - .dig(Util::String.normalize(term)) - &.map { |key| ISO3166::Country.new(key) } + .slice(*subregions) end - # @return [Hash>] Ex. { "Central Asia" => [...], ... } - def self.all_subregions - all_countries - .group_by(&:subregion) - .tap do |subregions| - # Multiple countries do not have a valid subregion so shouldn't be shown. - # (010 | AQ | ATA | Antarctica) - # (074 | BV | BVT | Bouvet Island) - # (334 | HM | HMD | Heard Island and McDonald Islands) - subregions.delete("") - end - end - - # @param terms [String, Array] - # @return [Hash>] + # @param terms [String, Array] search terms + # @return [Hash>] ISO4127 3 letter currency code to ISO3166 2 letter country codes def self.countries_by_currencies(terms) - terms = Array(terms).map(&Util::String.method(:normalize)) + terms = Array(terms) currency_codes = Cache .get("search_index/direct_match_currency.json") .values_at(*terms) @@ -68,34 +46,11 @@ def self.countries_by_currencies(terms) Cache .get("search_index/countries_by_currency.json") .slice(*currency_codes) - .to_h do |currency_code, country_codes| - [ - Money::Currency.new(currency_code), - country_codes.map(&Data.method(:country_by_code)), - ] - end end - # @return [Hash>] + # @return [Hash>] ISO4127 3 letter currency code to ISO3166 2 letter country codes def self.all_currencies - Cache - .get("search_index/countries_by_currency.json") - .to_h do |currency_code, country_codes| - [ - Money::Currency.new(currency_code), - country_codes.map(&Data.method(:country_by_code)), - ] - end - end - - # @param number [String] ISO3166-1 numeric country code - # @return [String, nil] - def self.emoji_flag(iso_number) - @emoji_flag ||= all_countries - .to_h { |country| [country.number, country.emoji_flag] } - .freeze - - @emoji_flag[iso_number] + Cache.get("search_index/countries_by_currency.json") end end end diff --git a/lib/atlasq/format.rb b/lib/atlasq/format.rb index c9fab94..2482752 100644 --- a/lib/atlasq/format.rb +++ b/lib/atlasq/format.rb @@ -60,127 +60,73 @@ def self.brief_template(title:, elements:) ].join("\n") end - # @example - # * - # * Title - # * * * * * - # (attr1 | attr2 | attr3) - # | Info One: 1 - # | Info Two: 2 - # | Info Three: 3 - # |________________________________________ - # + # @param country_codes [Array] ISO3166 2 letter country codes # @param title [String] - # @param attributes [String] - # @param info [Hash] # @return [String] - def self.verbose_template(title:, attributes:, info:) - info_ladder = info.map.with_index do |(name, value), index| - "#{" " * (index + 1)}| #{name}: #{value}" - end - info_ladder << "#{" " * (info_ladder.size + 1)}|#{"_" * 40}" + def self.countries(country_codes, title:) + Format.brief_template( + title: title, + elements: country_codes.map do |country| + Format.one_line_country(country) + end + ) + end + # @param country_code [String] ISO3166 2 letter country code + # @return [String] + def self.country(country_code) [ - Format.title(title), - attributes, - *info_ladder, + Format.country_title(country_code), + Format.one_line_country(country_code), + Format.multiline_country(country_code), ].join("\n") end - # @param country [ISO3166::Country] - # @param search_term [String] + # @param country_code [String] ISO3166 2 letter country code # @return [String] - def self.country(country, search_term) - Format.verbose_template( - title: "Country: #{country.iso_long_name}", - attributes: Format.one_line_country(country), - info: { - "Search Term" => search_term, - "Languages" => Format.languages(country.languages), - "Nationality" => country.nationality, - "Region" => country.subregion, - "Continent" => country.continent, - "Currency" => "#{country.currency.symbol} #{country.currency.name}", - }.reject do |_, value| - # "countries" like Antarctica can have missing language, nationality, - # and region data so we remove that missing data beforehand. - value.nil? || value.empty? - end.to_h - ) + def self.country_title(country_code) + Cache + .get("formatted_output/country_title.json") + .fetch(country_code) + .then(&Format.method(:title)) end - # @example "English / Shona / Ndebele, North; North Ndebele" - # @param language_codes [Array] Ex. ["id"] + # @param country_code [String] ISO3166 2 letter country code # @return [String] - def self.languages(language_codes) - language_codes - .take(4) # arbitrary limit to avoid long lines - .map do |lang| - ISO_639.find(lang).english_name - end - .join(" / ") + def self.one_line_country(country_code) + Cache + .get("formatted_output/one_line_country.json") + .fetch(country_code) end - # @param countries [Array] - # @param title [String] + # @param country_code [String] ISO3166 2 letter country code # @return [String] - def self.countries(countries, title:) - Format.brief_template( - title: title, - elements: countries.map do |country| - Format.one_line_country(country) - end - ) + def self.multiline_country(country_code) + Cache + .get("formatted_output/multiline_country.json") + .fetch(country_code) end - # @param country [ISO3166::Country|Hash] + # @param subregions [Hash>] region name to ISO3166 2 letter country codes # @return [String] - def self.one_line_country(country) - case country - when ISO3166::Country - [ - country.emoji_flag, - country.number, - country.alpha2, - country.alpha3, - country.iso_short_name, - ] - when Hash - values = country.slice( - "number", - "alpha2", - "alpha3", - "iso_short_name" - ).values - + def self.subregions(subregions) + subregions = subregions.to_h do |region, countries| [ - Data.emoji_flag(country.fetch("number")), - *values, + Util::String.titleize(region), + countries.map(&Format.method(:one_line_country)), ] - else - raise Error, "Unknown country type: #{country.class}" - end.then do |country_values| - "(#{country_values.compact.join(" | ")})" - end - end - - # @param subregions [Hash>] - # @return [String] - def self.subregions(subregions) - subregions.transform_values! do |countries| - countries.map(&Format.method(:one_line_country)) end Format.brief_template(title: "All Subregions", elements: subregions) end - # @param currencies [Hash>] + # @param currencies [Hash>] 3 letter currency code to ISO3166 2 letter country codes # @param partial_match [Boolean] defaults to false # @return [String] def self.currencies(currencies, partial_match: false) currencies = currencies.to_h do |currency, countries| [ - "[#{currency.iso_code}] #{currency.symbol} #{currency.name}", + Format.one_line_currency(currency), countries.map(&Format.method(:one_line_country)), ] end @@ -194,5 +140,11 @@ def self.currencies(currencies, partial_match: false) Format.brief_template(title: title, elements: currencies) end end + + def self.one_line_currency(currency_code) + Cache + .get("formatted_output/one_line_currency.json") + .fetch(currency_code) + end end end diff --git a/lib/atlasq/util/string.rb b/lib/atlasq/util/string.rb index a41a4f0..960de11 100644 --- a/lib/atlasq/util/string.rb +++ b/lib/atlasq/util/string.rb @@ -40,7 +40,8 @@ def self.normalize(string) @normalize[string] ||= Unaccent.unaccent(string.downcase) end - # Split a sentence on words ignoring irrelevant punctuation. + # Split on spaces, tabs and punctuation separators. + # Note: Some punctuation can be connectors or separators based on the language. # # @param sentence [String] # @return [Array] diff --git a/lib/atlasq/util/word_map.rb b/lib/atlasq/util/word_map.rb index 27369ee..b1bc5d0 100644 --- a/lib/atlasq/util/word_map.rb +++ b/lib/atlasq/util/word_map.rb @@ -23,24 +23,12 @@ def initialize(index:) # @return [Array] list of ids def search(search_term) search_term - .then { |string| split(string) } - .map { |word| Util::String.normalize(word) } + .then(&Util::String.method(:word_split)) .uniq .map { |word| @index.fetch(word, []) } .inject(&:intersection) .sort end - - private - - # Split on spaces, tabs and punctuation separators. - # Note: Some punctuation can be connectors or separators based on the language. - # - # @param sentence [String] - # @return [Array] - def split(sentence) - sentence.split(/[ \t,;:()]+/).reject(&:empty?) - end end end end diff --git a/script/generate_formatted_output.rb b/script/generate_formatted_output.rb new file mode 100644 index 0000000..9ec365a --- /dev/null +++ b/script/generate_formatted_output.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +require "atlasq" + +require_relative "shared/cache_generator" +require_relative "shared/country_info" + +# --- Helpers --- + +# @param country [ISO3166::Country|Hash] +# @return [String] +def one_line_country(country) + [ + country.emoji_flag, + country.number, + country.alpha2, + country.alpha3, + country.iso_short_name, + ].compact + .join(" | ") + .then { |country_string| "(#{country_string})" } +end + +# @example "English / Shona / Ndebele, North; North Ndebele" +# @param language_codes [Array] Ex. ["id"] +# @return [String] +def languages(language_codes) + language_codes + .take(4) # arbitrary limit to avoid long lines + .map do |lang| + ISO_639.find(lang).english_name + end + .join(" / ") +end + +# --- Load Cache --- + +cache = CacheGenerator.new(namespace: "formatted_output") + +cache.add "one_line_country" do + ALL_COUNTRIES.to_h do |country| + [ + country.alpha2.downcase, + one_line_country(country), + ] + end +end + +cache.add "country_title" do + ALL_COUNTRIES.to_h do |country| + [ + country.alpha2.downcase, + "Country: #{country.iso_long_name}", + ] + end +end + +cache.add "multiline_country" do + ALL_COUNTRIES.to_h do |country| + country_info = { + "Languages" => languages(country.languages), + "Nationality" => country.nationality, + "Region" => country.subregion, + "Continent" => country.continent, + "Currency" => "#{country.currency.symbol} #{country.currency.name}", + }.reject do |_, value| + # "countries" like Antarctica can have missing language, nationality, + # and region data so we remove that missing data beforehand. + value.nil? || value.empty? + end + + info_ladder = country_info.map.with_index do |(name, value), index| + "#{" " * (index + 1)}| #{name}: #{value}" + end + info_ladder << "#{" " * (info_ladder.size + 1)}|#{"_" * 40}" + + [ + country.alpha2.downcase, + info_ladder.join("\n"), + ] + end +end + +cache.add "one_line_currency" do + ALL_CURRENCIES.to_h do |currency| + [ + currency.iso_code.downcase, + "[#{currency.iso_code}] #{currency.symbol} #{currency.name}", + ] + end +end + +# --- Run --- + +case ARGV.first +when "generate" + cache.generate +when "outdated" + cache.outdated +else + warn "Error: Expected a valid subcommand: generate or outdated" + exit 1 +end diff --git a/script/generate_list.rb b/script/generate_list.rb new file mode 100644 index 0000000..e3d34d4 --- /dev/null +++ b/script/generate_list.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +require "atlasq" + +require_relative "shared/cache_generator" +require_relative "shared/country_info" + +# --- Load Cache --- + +cache = CacheGenerator.new(namespace: "list") + +cache.add "all_countries" do + ALL_COUNTRIES.map { |country| country.alpha2.downcase } +end + +cache.add "all_subregions" do + ALL_COUNTRIES + .map { |country| country.subregion.downcase } + .uniq + .sort + .tap do |subregions| + # Multiple countries do not have a valid subregion so shouldn't be shown. + # (010 | AQ | ATA | Antarctica) + # (074 | BV | BVT | Bouvet Island) + # (334 | HM | HMD | Heard Island and McDonald Islands) + subregions.delete("") + end +end + +# --- Run --- + +case ARGV.first +when "generate" + cache.generate +when "outdated" + cache.outdated +else + warn "Error: Expected a valid subcommand: generate or outdated" + exit 1 +end diff --git a/script/generate_search_index.rb b/script/generate_search_index.rb index 078d01f..10aab60 100644 --- a/script/generate_search_index.rb +++ b/script/generate_search_index.rb @@ -3,35 +3,7 @@ require "atlasq" require_relative "shared/cache_generator" - -# --- Data --- - -require "countries" -require "iso-639" -require "money" - -ISO3166.configure do |config| - # Needed to allow us to access the `ISO3166::Country#currency` - # object which ends up being an instance of `Money::Currency`. - config.enable_currency_extension! - - # Needed to allow us to search by localized country name. - config.locales = %i[ - af am ar as az be bg bn br bs - ca cs cy da de dz el en eo es - et eu fa fi fo fr ga gl gu he - hi hr hu hy ia id is it ja ka - kk km kn ko ku lt lv mi mk ml - mn mr ms mt nb ne nl nn oc or - pa pl ps pt ro ru rw si sk sl - so sq sr sv sw ta te th ti tk - tl tr tt ug uk ve vi wa wo xh - zh zu - ] -end - -ALL_COUNTRIES = ISO3166::Country.all.freeze -ALL_CURRENCIES = ALL_COUNTRIES.map(&:currency).uniq.freeze +require_relative "shared/country_info" # --- Load Cache --- diff --git a/script/shared/country_info.rb b/script/shared/country_info.rb new file mode 100644 index 0000000..4273007 --- /dev/null +++ b/script/shared/country_info.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require "countries" +require "iso-639" +require "money" + +ISO3166.configure do |config| + # Needed to allow us to access the `ISO3166::Country#currency` + # object which ends up being an instance of `Money::Currency`. + config.enable_currency_extension! + + # Needed to allow us to search by localized country name. + config.locales = %i[ + af am ar as az be bg bn br bs + ca cs cy da de dz el en eo es + et eu fa fi fo fr ga gl gu he + hi hr hu hy ia id is it ja ka + kk km kn ko ku lt lv mi mk ml + mn mr ms mt nb ne nl nn oc or + pa pl ps pt ro ru rw si sk sl + so sq sr sv sw ta te th ti tk + tl tr tt ug uk ve vi wa wo xh + zh zu + ] +end + +ALL_COUNTRIES = ISO3166::Country.all.freeze +ALL_CURRENCIES = ALL_COUNTRIES.map(&:currency).uniq.freeze diff --git a/test/fixtures/all_regions_output.txt b/test/fixtures/all_regions_output.txt index 90dc4cb..97b2c00 100644 --- a/test/fixtures/all_regions_output.txt +++ b/test/fixtures/all_regions_output.txt @@ -177,7 +177,7 @@ (๐Ÿ‡ธ๐Ÿ‡ท | 740 | SR | SUR | Suriname) (๐Ÿ‡บ๐Ÿ‡พ | 858 | UY | URY | Uruguay) (๐Ÿ‡ป๐Ÿ‡ช | 862 | VE | VEN | Venezuela (Bolivarian Republic of)) -- South-Eastern Asia +- South Eastern Asia (๐Ÿ‡ง๐Ÿ‡ณ | 096 | BN | BRN | Brunei Darussalam) (๐Ÿ‡ฎ๐Ÿ‡ฉ | 360 | ID | IDN | Indonesia) (๐Ÿ‡ฐ๐Ÿ‡ญ | 116 | KH | KHM | Cambodia) diff --git a/test/test_atlasq.rb b/test/test_atlasq.rb index c573492..f565ae1 100644 --- a/test/test_atlasq.rb +++ b/test/test_atlasq.rb @@ -66,13 +66,12 @@ def test_country_success * Country: The Republic of Chile * * * * * * * * * * * * * * * * * * (๐Ÿ‡จ๐Ÿ‡ฑ | 152 | CL | CHL | Chile) - | Search Term: chile - | Languages: Spanish; Castilian - | Nationality: Chilean - | Region: South America - | Continent: South America - | Currency: $ Chilean Peso - |________________________________________ + | Languages: Spanish; Castilian + | Nationality: Chilean + | Region: South America + | Continent: South America + | Currency: $ Chilean Peso + |________________________________________ OUTPUT [ @@ -111,7 +110,7 @@ def test_region_success def test_region_failure assert_command args: %w[-r Pyrrus], - expected_stdout: "Unknown region: Pyrrus\n", + expected_stdout: "Unknown region: pyrrus\n", expected_status: 1 end @@ -133,13 +132,13 @@ def test_currency_success def test_currency_failure assert_command args: ["-m", "Double Dollars"], - expected_stdout: "Unknown currency: Double Dollars\n", + expected_stdout: "Unknown currency: double dollars\n", expected_status: 1 end def test_any_failure assert_command args: ["Grand Line"], - expected_stdout: "Unknown search term: Grand Line\n", + expected_stdout: "Unknown search term: grand line\n", expected_status: 1 end end diff --git a/test/test_shell.rb b/test/test_shell.rb index 97099b4..d47f473 100644 --- a/test/test_shell.rb +++ b/test/test_shell.rb @@ -15,33 +15,29 @@ def fixture(file_name) # # COUNTRY # - def expected_country_output(search_term) - <<~OUTPUT + def test_country_output + expected_output = <<~OUTPUT * * Country: The Commonwealth of Australia * * * * * * * * * * * * * * * * * * * * * * (๐Ÿ‡ฆ๐Ÿ‡บ | 036 | AU | AUS | Australia) - | Search Term: #{search_term} - | Languages: English - | Nationality: Australian - | Region: Australia and New Zealand - | Continent: Australia - | Currency: $ Australian Dollar - |________________________________________ + | Languages: English + | Nationality: Australian + | Region: Australia and New Zealand + | Continent: Australia + | Currency: $ Australian Dollar + |________________________________________ OUTPUT - end - def test_country_output commands = %w[-c --country --countries] countries = %w[AU AUS 036 Australia Awstraaliya] commands.product(countries).each do |args| - search_term = args.last actual_output, _err = capture_io do Atlasq::Shell.start!(args) end - assert_equal expected_country_output(search_term), actual_output + assert_equal expected_output, actual_output end end From 2ae8ceff5030fe238c946fc75d57a83ef73e2512 Mon Sep 17 00:00:00 2001 From: apainintheneck Date: Mon, 18 Dec 2023 21:15:13 -0800 Subject: [PATCH 2/3] Remove most runtime gems and instead add them to gemfile --- Gemfile | 10 +++++++--- Gemfile.lock | 12 ++++++------ atlasq.gemspec | 3 --- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 1c19fd6..96cab3a 100644 --- a/Gemfile +++ b/Gemfile @@ -5,10 +5,14 @@ source "https://rubygems.org" # Specify your gem's dependencies in atlasq.gemspec gemspec -gem "rake", "~> 13.0" +gem "rake" -gem "minitest", "~> 5.0" +gem "minitest" -gem "rubocop", "~> 1.21" +gem "rubocop" gem "rubocop-minitest" gem "rubocop-rake" + +gem "countries" +gem "iso-639" +gem "money" diff --git a/Gemfile.lock b/Gemfile.lock index bd5daf9..471f49d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,9 +2,6 @@ PATH remote: . specs: atlasq (0.2.0) - countries (~> 5.7) - iso-639 (~> 0.3) - money (~> 6.9) tty-pager (~> 0.14) GEM @@ -67,9 +64,12 @@ PLATFORMS DEPENDENCIES atlasq! - minitest (~> 5.0) - rake (~> 13.0) - rubocop (~> 1.21) + countries + iso-639 + minitest + money + rake + rubocop rubocop-minitest rubocop-rake diff --git a/atlasq.gemspec b/atlasq.gemspec index 55147c0..dd92448 100644 --- a/atlasq.gemspec +++ b/atlasq.gemspec @@ -26,8 +26,5 @@ Gem::Specification.new do |spec| spec.bindir = "exe" spec.executables = ["atlasq"] - spec.add_dependency "countries", "~> 5.7" - spec.add_dependency "iso-639", "~> 0.3" - spec.add_dependency "money", "~> 6.9" spec.add_dependency "tty-pager", "~> 0.14" end From 7e68ac7260e4d810997cc6994c9e36310c2d7392 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 18 Dec 2023 21:23:45 -0800 Subject: [PATCH 3/3] Update cache/README.md Fix typo --- cache/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/README.md b/cache/README.md index 231195f..3c69926 100644 --- a/cache/README.md +++ b/cache/README.md @@ -16,7 +16,7 @@ As the name would suggest, this generates a bunch of search indexes that are bas ### script/generate_formatted_output.rb -This is where we generate the formatted output so that we don't need to include runtime dependencies to load country, currency and region informaton. +This is where we generate the formatted output so that we don't need to include runtime dependencies to load country, currency and region information. ### script/generate_list.rb