-
Notifications
You must be signed in to change notification settings - Fork 42
Command line usage
zverok edited this page Apr 9, 2016
·
1 revision
Since version 0.0.4, Reality includes ability to describe real-world entites right from your terminal:
$ reality Katmandu
----------------------------------
#<Reality::Entity(Kathmandu):city>
----------------------------------
area: #<Reality::Measure(49 km²)>
coord: #<Reality::Geo::Coord(27°43′0″N,85°22′0″E)>
country: #<Reality::Entity?(Nepal)>
elevation: #<Reality::Measure(1,400 m)>
located_in: #<Reality::Entity?(Nepal)>
long_name: "Kathmandu Metropolitan City\nKTM"
official_website: "http://www.kathmandu.gov.np"
population: #<Reality::Measure(975,453 person)>
tz_offset: #<Reality::TZOffset(UTC+05:45)>
reality command supports chained method calls to received entities, so
you can do things like:
$ reality Kathmandu country population
30,986,975person
Note that currently you should explicitly add describe to method chain
for any received entity other than first, if you want detailed descr:
$ reality Kathmandu country
Nepal
$ reality Kathmandu country describe
---------------------------------
#<Reality::Entity(Nepal):country>
---------------------------------
adm_divisions: #<Reality::List["Far-Western Development Region, Nepal"?, Western Region?, Mid-Western Region?, Eastern Development Region?, Central Region?]>
area: #<Reality::Measure(147,181 km²)>
calling_code: "+977"
capital: #<Reality::Entity?(Kathmandu)>
continent: #<Reality::Entity?(Asia)>
....
We are looking for your input to understand how reality command will
be used and what behaviors can be added to it (may be --json option,
for example?)
Great thanks to @codenamev who had built it!
NB: Interactive console (which previously was called with reality
command) is still here, you can use it with reality --interactive or
reality -i.
- Intro
- Applications
- Links and mentions
- Tutorial:
- Tips & tricks
- Advanced topics
- Molybdenum?..