meiou 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/meiou/astronomy.rb +65 -0
- data/lib/meiou/emoji.rb +21 -0
- data/lib/meiou/version.rb +1 -1
- data/lib/meiou.rb +4 -0
- data/meiou.gemspec +2 -0
- metadata +31 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 635835a619033aac34ef66203e947334af5c5cba105ec4df9cabd8cde81c2092
|
4
|
+
data.tar.gz: eab2e83e4e1e93c7211488b1353d2855e339ed894bc6b41902cc5b344c5d44e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5a9a1222184e218cc6256fe25fb648e288c756bf23968c516218535eb09e2b1a92b42d8a61a58b815519f9cb0ccdd239548b2be51901ae95d66cdaf5d1b3c4b
|
7
|
+
data.tar.gz: 68f0480b6ae2a9606f70f8c638c8eb051af0648c1d53cdc25ef3967e38c4a893dd997bf034acafe750657cc3bbb6286e658653d975724d8a3f4f3b27fc994ae0
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'astronomy'
|
2
|
+
|
3
|
+
module ASTRO
|
4
|
+
|
5
|
+
@@ASTRO = Astronomy::Information.new
|
6
|
+
|
7
|
+
def self.search k
|
8
|
+
h = {}
|
9
|
+
@@ASTRO.search(k).each { |e| h[e["name"]] = e["description"] }
|
10
|
+
return h
|
11
|
+
end
|
12
|
+
|
13
|
+
@@C = Hash.new { |h,k| h[k] = @@ASTRO.topics(k) }
|
14
|
+
|
15
|
+
def self.[] k
|
16
|
+
@@C[k]
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.keys
|
20
|
+
@@C.keys
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.to_h
|
24
|
+
h = Hash.new { |h,k| h[k] = {} }
|
25
|
+
ASTRO.keys.each { |e| ASTRO[e].each { |ee| h[e][ee['name']] = ee["description"] } }
|
26
|
+
return h
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.to_a
|
30
|
+
a = []
|
31
|
+
ASTRO.to_h.each_pair { |k,v| v.each_pair { |kk,vv| a << vv } }
|
32
|
+
return a
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.to_s
|
36
|
+
ASTRO.to_a.join("\n\n")
|
37
|
+
end
|
38
|
+
|
39
|
+
@@ASTRO.categories.each { |e| @@C[e] }
|
40
|
+
|
41
|
+
def self.zodiac
|
42
|
+
[ :cancer,:leo,:capricorn,:gemini,:aquarius,:libra,:taurus,:aries,:pisces ]
|
43
|
+
end
|
44
|
+
def self.movements
|
45
|
+
[ :rising, :falling, 'at rest' ]
|
46
|
+
end
|
47
|
+
def self.signs
|
48
|
+
[ :sun, :moon ]
|
49
|
+
end
|
50
|
+
def self.orbits
|
51
|
+
[ "in retrograde", "in procession", "at equinox", "at perogy", "at apogy" ]
|
52
|
+
end
|
53
|
+
def self.alignments
|
54
|
+
[:parallel,:tangential,:perpendicular]
|
55
|
+
end
|
56
|
+
def self.planets
|
57
|
+
[:mercury,:venus,:mars,:vesta,:ceres,:jupiter,:saturn,:uranus,:neptune,:pluto]
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
module Meiou
|
62
|
+
def self.astronomy
|
63
|
+
ASTRO
|
64
|
+
end
|
65
|
+
end
|
data/lib/meiou/emoji.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'gemoji'
|
2
|
+
|
3
|
+
module EMOJI
|
4
|
+
|
5
|
+
def self.[] k
|
6
|
+
Emoji.find_by_alias(k.to_s)
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.translate i
|
10
|
+
a = []
|
11
|
+
Meiou.extract(i) { |e| if EMOJI[e[:word]]; a << EMOJI[e[:word]].raw; else; a << e[:word]; end }
|
12
|
+
return a
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
module Meiou
|
18
|
+
def self.simplify i
|
19
|
+
EMOJI.translate i
|
20
|
+
end
|
21
|
+
end
|
data/lib/meiou/version.rb
CHANGED
data/lib/meiou.rb
CHANGED
data/meiou.gemspec
CHANGED
@@ -37,6 +37,8 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_dependency "tokenizer"
|
38
38
|
spec.add_dependency "textmood"
|
39
39
|
spec.add_dependency "tokipona"
|
40
|
+
spec.add_dependency "astronomy"
|
41
|
+
spec.add_dependency "gemoji"
|
40
42
|
# For more information and examples about making a new gem, check out our
|
41
43
|
# guide at: https://bundler.io/guides/creating_gem.html
|
42
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meiou
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Olson
|
@@ -94,6 +94,34 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: astronomy
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: gemoji
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
description: A wrapper for for wikipedia entries, curated txt files, and other sources
|
98
126
|
of knowledge.
|
99
127
|
email:
|
@@ -141,8 +169,10 @@ files:
|
|
141
169
|
- books/interpretation_of_dreams.txt
|
142
170
|
- books/the_prince.txt
|
143
171
|
- lib/meiou.rb
|
172
|
+
- lib/meiou/astronomy.rb
|
144
173
|
- lib/meiou/book.rb
|
145
174
|
- lib/meiou/dictionary.rb
|
175
|
+
- lib/meiou/emoji.rb
|
146
176
|
- lib/meiou/mood.rb
|
147
177
|
- lib/meiou/tokipona.rb
|
148
178
|
- lib/meiou/version.rb
|