Project

atlasq

0.0
There's a lot of open issues
Country, region, and currency info at your fingertips. Query for regional info and see which countries show up.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.4.0
~> 0.14.0
 Project Readme

Atlasq

Gem Version

Query for country info at the command line.

$ atlasq 
atlasq -- a utility to query country info

usage:
  atlasq query...
  atlasq [command] query...
  atlasq -h/--help
  atlasq -v/--version

commands:
  -c/--country : find countries
  -r/--region  : find countries by region
  -m/--money   : find countries by currency

Install the gem from RubyGems with gem install atlasq.

Note: This gem is only tested on Linux and macOS.

Documentation

$ atlasq --help
NAME
  atlasq -- a utility to query country info

SYNOPSIS:
  atlasq [query ...]
  atlasq [option]
  atlasq [option] [query ...]

DESCRIPTIONS
  Atlas Query aims to be the the simplest way to query for country
  info at the command line. It includes logic to not only find
  countries by name but also by region and currency.

  To do this we take advantage of a myriad of different ISO standards:
    - ISO3166 : Alpha and numeric codes for countries and subdivisions
    - ISO4217 : Alpha and numeric codes for currencies
    - ISO639  : Alpha and numeric codes for languages

OPTIONS
  [none]
    : Search for countries by the following criteria
      1. country  (like --country)
      2. region   (like --region)
      3. currency (like --money)

  -c/--country
    : Display all countries
  -c/--country [query ...]
    : Search for countries by the following criteria
      1. alpha2 (ISO3166 standard 2 letter code)
      2. alpha3 (ISO3166 standard 3 letter code)
      3. number (ISO3166 standard 3 digit code)
      4. name   (common, localized, unofficial)
      5. partial match on name

  -r/--region
    : Display all countries by subregion
  -r/--region  [query ...]
    : Search for countries by the following criteria
      1. region
      2. subregion
      3. world region (4 letter code)
      4. continent

  -m/--money
    : Display all countries by currency
  -m/--money   [query ...]
    : Search for countries by the following criteria
      1. code   (ISO4127 standard 3 letter code)
      2. name   (ISO4127 standard name)
      3. symbol
      4. partial match on name

  -l/--language
    : Display all countries by language
  -l/--language   [query ...]
    : Search for countries by the following criteria
      1. alpha2 (ISO639 standard 2 letter code)
      2. alpha3 (ISO639 standard 3 letter code)
      3. partial match on name in English or French

  -h/--help
    : Display this page

  -v/--version
    : Display the version (1.0.2)

  -d/--debug
    : Display debug output

Examples

Countries

$ atlasq --country 418
*
* Country: The Lao People's Democratic Republic
* * * * * * * * * * * * * * * * * * * * * * * * *
(πŸ‡±πŸ‡¦ | 418 | LA | LAO | Lao People's Democratic Republic)
 | Languages: Lao
  | Nationality: Laotian
   | Region: South-Eastern Asia
    | Continent: Asia
     | Currency: β‚­ Lao Kip
      |________________________________________
$ atlasq --country AM
*
* Country: The Republic of Armenia
* * * * * * * * * * * * * * * * * * *
(πŸ‡¦πŸ‡² | 051 | AM | ARM | Armenia)
 | Languages: Armenian / Russian
  | Nationality: Armenian
   | Region: Western Asia
    | Continent: Asia
     | Currency: Υ€Φ€. Armenian Dram
      |________________________________________
$ atlasq --country honduras
*
* Country: The Republic of Honduras
* * * * * * * * * * * * * * * * * * *
(πŸ‡­πŸ‡³ | 340 | HN | HND | Honduras)
 | Languages: Spanish; Castilian
  | Nationality: Honduran
   | Region: Central America
    | Continent: North America
     | Currency: L Honduran Lempira
      |________________________________________

Regions

$ atlasq --region melanesia
*
* Region: Melanesia
* * * * * * * * * * *
(πŸ‡«πŸ‡― | 242 | FJ | FJI | Fiji)
(πŸ‡³πŸ‡¨ | 540 | NC | NCL | New Caledonia)
(πŸ‡΅πŸ‡¬ | 598 | PG | PNG | Papua New Guinea)
(πŸ‡ΈπŸ‡§ | 090 | SB | SLB | Solomon Islands)
(πŸ‡»πŸ‡Ί | 548 | VU | VUT | Vanuatu)
$ atlasq --region antarctica
*
* Region: Antarctica
* * * * * * * * * * * *
(πŸ‡¦πŸ‡Ά | 010 | AQ | ATA | Antarctica)
(πŸ‡§πŸ‡» | 074 | BV | BVT | Bouvet Island)
(πŸ‡¬πŸ‡Έ | 239 | GS | SGS | South Georgia and the South Sandwich Islands)
(πŸ‡­πŸ‡² | 334 | HM | HMD | Heard Island and McDonald Islands)

Currencies

$ atlasq --money ANG
*
* Currency: [ANG] Ζ’ Netherlands Antillean Gulden
* * * * * * * * * * * * * * * * * * * * * * * * * *
(πŸ‡¨πŸ‡Ό | 531 | CW | CUW | CuraΓ§ao)
(πŸ‡ΈπŸ‡½ | 534 | SX | SXM | Sint Maarten (Dutch part))
$ atlasq --money \ΰΈΏ
*
* Currencies (Partial Match)
* * * * * * * * * * * * * * * *
- [THB] ΰΈΏ Thai Baht
    (πŸ‡ΉπŸ‡­ | 764 | TH | THA | Thailand)
$ atlasq --money Surinamese\ Dollar
*
* Currency: [SRD] $ Surinamese Dollar
* * * * * * * * * * * * * * * * * * * *
(πŸ‡ΈπŸ‡· | 740 | SR | SUR | Suriname)

Languages

$ atlasq --language ch
*
* Language: (ch/cha) Chamorro
* * * * * * * * * * * * * * * *
(πŸ‡¬πŸ‡Ί | 316 | GU | GUM | Guam)
(πŸ‡²πŸ‡΅ | 580 | MP | MNP | Northern Mariana Islands)
$ atlasq --language greek
*
* Languages (Partial Match)
* * * * * * * * * * * * * * *
- (el/gre) Greek, Modern (1453-)
    (πŸ‡¨πŸ‡Ύ | 196 | CY | CYP | Cyprus)
    (πŸ‡¬πŸ‡· | 300 | GR | GRC | Greece)

Data

Country data is sourced from the countries gem which provides country and region information and implements the ISO3166 standard country codes and names.

Currency data is sourced from the money gem which provides information about currency names and symbols.

Language data is sourced from the ISO-639 gem which implements the ISO369 standard for language codes and names.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. Use either rake lint to lint the code or rake fix to automatically fix simple linter errors.

You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

This file gets generated with the rake readme:generate command to make sure the example output is always up-to-date. We even check for this on CI with the rake readme:outdated command.

More information about cached files can be found in cache/README.md.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/apainintheneck/atlasq.

License

The gem is available as open source under the terms of the MIT License.