molybdenum-99 / reality

Comprehensive data proxy to knowledge about real world
MIT License
818 stars 43 forks source link

Country lists #2

Closed zverok closed 8 years ago

zverok commented 8 years ago
  1. All countries list: it seems, should be hardcoded into reality (extracted from Wikipedia with some script, updated on each errrr world situation update), and just grabbed as a list via infoboxer;
  2. (Later?) Some specialized country lists (see Wolfram, see Wikipedia categories, and so on), like:
    • G8/G20/UN/other alianses countries;
    • countries by continent
    • ...

Ruby syntaxt for 2 may be like:

# fetch-then-test syntax
Reality.countries.select(&:g20?)
Reality.countries.select{|c| c.continent.name == 'South America'}

# DB-alike query syntax
Reality.countries.where(continent: 'South America').all
zverok commented 8 years ago

In this generic form -- consider implemented. More to follow.