Skip to content
zverok edited this page Apr 13, 2016 · 5 revisions

Welcome to Reality, Neo!

Reality is Ruby library which wants to make all the world data computable. It provides access to data from open authorative data sources, like Wikipedia, in form of Ruby objects which you can use from your scripts. Just like this:

matrix = Reality::Entity('The Matrix')
# => #<Reality::Entity(The Matrix)>
matrix.describe
# ------------------------------
# #<Reality::Entity(The Matrix)>
# ------------------------------
#              actors: #<Reality::List[Hugo Weaving?, Keanu Reeves?, Laurence Fishburne?, Carrie-Anne Moss?, Joe Pantoliano?, Gloria Foster?, Robert Taylor?, Marcus Chong?, Paul Goddard?, Matt Doran?, Ada Nicodemou?, Steve Dodd?, Anthony Ray Parker?, Paul Goddard?, Belinda McClory?, Julian Arahanga?, Rowan Witt?]>
#              awards: #<Reality::List[Academy Award for Best Film Editing?, Academy Award for Best Visual Effects?, Academy Award for Best Sound Editing?, National Film Registry?, Academy Award for Best Sound Mixing?, Saturn Award for Best Science Fiction Film?]>
#           directors: #<Reality::List[The Wachowskis?]>
#              genres: ["cyberpunk", "thriller film", "action thriller", "dystopian film", "science fiction action film"]
#         nominations: #<Reality::List[Academy Award for Best Film Editing?, Academy Award for Best Visual Effects?, Academy Award for Best Sound Editing?, Academy Award for Best Sound Mixing?]>
#    official_website: "http://whatisthematrix.warnerbros.com/"
#  original_languages: ["English"]
#            precedes: #<Reality::Entity?(The Matrix Reloaded)>
#           producers: #<Reality::List[Joel Silver?]>
#        published_at: #<Date: 1999-01-01>
#       work_subjects: ["telepresence", "hacker"]

matrix.directors.first.describe
# -----------------------------------------
# #<Reality::Entity(The Wachowskis):person>
# -----------------------------------------
#  parts: #<Reality::List[Lilly Wachowski?, Lana Wachowski?]>

matrix.directors.first.parts.each(&:describe)
# -----------------------------------
# #<Reality::Entity(Lilly Wachowski)>
# -----------------------------------
#       awards: #<Reality::List[Saturn Award for Best Director?]>
#  birth_place: #<Reality::Entity?(Chicago)>
#     birthday: #<Date: 1967-12-29>
#  citizenship: #<Reality::Entity?(United States of America)>
#   given_name: "Lilly"
#  nominations: #<Reality::List[Nebula Award for Best Script?, Saturn Award for Best Writing?, Hugo Award for Best Dramatic Presentation (Long Form)?, German Film Award for Best Direction?, German Film Award for Best Feature Film?, Golden Raspberry Award for Worst Director?, Saturn Award for Best Director?, Hugo Award for Best Dramatic Presentation?, Las Vegas Film Critics Society Award for Best Screenplay?]>
#  occupations: ["screenwriter", "writer", "film director", "film producer"]
#      part_of: #<Reality::List[The Wachowskis?]>
#          sex: "transgender female"
# ----------------------------------
# #<Reality::Entity(Lana Wachowski)>
# ----------------------------------
#       awards: #<Reality::List[Saturn Award for Best Director?]>
#  birth_place: #<Reality::Entity?(Chicago)>
#     birthday: #<Date: 1965-06-21>
#  citizenship: #<Reality::Entity?(United States of America)>
#   given_name: "Lana"
#  occupations: ["screenwriter", "writer", "film director"]
#      part_of: #<Reality::List[The Wachowskis?]>
#          sex: "transgender female"

# ....aaaand so on!

Start your journey to Reality from README for good overview of what-s and why-s, or jump straight to Getting started to hack with it.

Some other useful parts of this wiki: