lyracyst 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lyracyst.rb +4 -8
- data/readme.md +10 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0908c49df1d2227c292db829c4e3fdff8de74ac
|
4
|
+
data.tar.gz: 2c6ff3ecb444c661be18a91246612742fb94b7e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e45738b4d2275a0ec747493af2c8d38b97332f012f25eb6e6a1a7fe5fa2342cda887a3f131ee5aa4b6660e5ef47fffe3d5ca6f30b382ff1b2ec2d98619f369f8
|
7
|
+
data.tar.gz: 43104cc0ad14f9c3769fe89d6862347c877e67aaacef7fc396a160559e1b6e71565e6146dfd1bc1be6ee0bae952d878883ac5420d315bc5a90ee3c079e28e613
|
data/lib/lyracyst.rb
CHANGED
@@ -7,12 +7,10 @@ require 'multi_json'
|
|
7
7
|
#require 'nokogiri'
|
8
8
|
require 'open-uri/cached'
|
9
9
|
require 'wordnik'
|
10
|
+
require 'commander.rb'
|
10
11
|
OpenURI::Cache.cache_path = 'tmp/open-uri' #transparent caching
|
11
12
|
environment='ruby'
|
12
13
|
result=''
|
13
|
-
program :name, 'lyracyst'
|
14
|
-
program :version, '0.0.1'
|
15
|
-
program :description, 'A powerful word search tool that fetches definitions, related words, and rhymes.'
|
16
14
|
#search='test' # (urlencoded string)
|
17
15
|
#print "Enter a word: " #change commenting here to convert between command line and test modes
|
18
16
|
class Fetch
|
@@ -128,7 +126,9 @@ class Search
|
|
128
126
|
print "\n"
|
129
127
|
end
|
130
128
|
end
|
131
|
-
|
129
|
+
program :name, 'lyracyst'
|
130
|
+
program :version, '0.0.1'
|
131
|
+
program :description, 'A powerful word search tool that fetches definitions, related words, and rhymes.'
|
132
132
|
command :get do |c|
|
133
133
|
c.syntax = 'lyracyst get [options]'
|
134
134
|
c.summary = 'Fetches all sources'
|
@@ -143,7 +143,6 @@ command :get do |c|
|
|
143
143
|
s.rhyme(search)
|
144
144
|
end
|
145
145
|
end
|
146
|
-
|
147
146
|
command :define do |c|
|
148
147
|
c.syntax = 'lyracyst define [options]'
|
149
148
|
c.summary = 'Fetches definitions'
|
@@ -156,7 +155,6 @@ command :define do |c|
|
|
156
155
|
s.define(search)
|
157
156
|
end
|
158
157
|
end
|
159
|
-
|
160
158
|
command :related do |c|
|
161
159
|
c.syntax = 'lyracyst related [options]'
|
162
160
|
c.summary = 'Fetches related words'
|
@@ -170,7 +168,6 @@ command :related do |c|
|
|
170
168
|
s.related(search)
|
171
169
|
end
|
172
170
|
end
|
173
|
-
|
174
171
|
command :rhyme do |c|
|
175
172
|
c.syntax = 'lyracyst rhyme [options]'
|
176
173
|
c.summary = 'Fetches rhymes'
|
@@ -183,4 +180,3 @@ command :rhyme do |c|
|
|
183
180
|
s.rhyme(search)
|
184
181
|
end
|
185
182
|
end
|
186
|
-
|
data/readme.md
CHANGED
@@ -24,15 +24,15 @@ Search [Wordnik](http://www.wordnik.com/), [thesaurus.altervista.org](http://the
|
|
24
24
|
|
25
25
|
### Usage
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
gem install lyracyst
|
28
|
+
lyracyst get test
|
29
29
|
|
30
30
|
### Code Example
|
31
31
|
|
32
32
|
s=Search.new
|
33
|
-
s.
|
34
|
-
s.
|
35
|
-
s.
|
33
|
+
s.define(search) # Wordnik definitions
|
34
|
+
s.related(search, result) # Altervista related words
|
35
|
+
s.rhyme(search) # Arpabet rhymes
|
36
36
|
|
37
37
|
### Motivation
|
38
38
|
|
@@ -42,6 +42,11 @@ I do a lot of writing and I wanted a tool for constructing song lyrics, poetry,
|
|
42
42
|
|
43
43
|
TODO
|
44
44
|
|
45
|
+
### Developers
|
46
|
+
|
47
|
+
bundle install
|
48
|
+
rake lyracyst:get[test]
|
49
|
+
|
45
50
|
### Contributing workflow
|
46
51
|
|
47
52
|
Here’s how we suggest you go about proposing a change to this project:
|