lita-retrotext 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +27 -0
- data/lib/lita/handlers/retrotext.rb +0 -3
- data/lita-retrotext.gemspec +1 -1
- data/pkg/lita-retrotext-0.0.1.gem +0 -0
- data/resources/sample.jpg +0 -0
- data/spec/lita/handlers/retrotext_spec.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ead45b22cabafdc0d5aa7b33336ba9bdacc03685202438cfb6ba92025d709a7
|
4
|
+
data.tar.gz: 6fb6d3d18ce99aa4e8993f2e1b303fccb447f43845e7835b7da494814aef2633
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92186327e63e61bec2f508999555005cee6b6f7ab8b853f66c8e201510dd00852c358023470614d6416b0abaa26b9038acf7b76be36c85a4dba20e488a754f09
|
7
|
+
data.tar.gz: 70ebd3a27eb3c5f0e445c270b5d08511f36bd6584011ce7aac304c4335888e34664f894df3d5a69a8003db47bdb46ef3ad7fa38c013243965dc99bb9ab580439
|
data/README.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# lita-retrotext
|
2
|
+
|
3
|
+
This plugin allows you to create text images from the retro-wave effect found on [photofunia](https://photofunia.com/effects/retro-wave?redirect=false).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add lita-retrotext to your Lita instance's Gemfile:
|
8
|
+
|
9
|
+
``` bash
|
10
|
+
gem "lita-retrotext"
|
11
|
+
```
|
12
|
+
|
13
|
+
## Configuration
|
14
|
+
|
15
|
+
There is no special configuration
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
To use, simply run the command:
|
20
|
+
|
21
|
+
```
|
22
|
+
[BOT_NAME] retro Top_text Middle_text Bottom_text
|
23
|
+
```
|
24
|
+
|
25
|
+
And the bot will generate an image like the following:
|
26
|
+
|
27
|
+

|
@@ -35,7 +35,6 @@ module Lita
|
|
35
35
|
top = response.matches.first[0].tr("_", " ")
|
36
36
|
middle = response.matches.first[1].tr("_", " ")
|
37
37
|
bottom = response.matches.first[2].tr("_", " ")
|
38
|
-
puts("generating image with top text: #{top} | middle text: #{middle} | bottom text: #{bottom}")
|
39
38
|
server = rand(9) + 1
|
40
39
|
uri_prefix = "http://photofunia.com"
|
41
40
|
uri_string = "#{uri_prefix}/categories/all_effects/retro-wave?server=#{server}"
|
@@ -44,7 +43,6 @@ module Lita
|
|
44
43
|
tries = 0
|
45
44
|
|
46
45
|
loop do
|
47
|
-
puts(uri_string)
|
48
46
|
uri = URI.parse(uri_string)
|
49
47
|
res = Net::HTTP.post_form(
|
50
48
|
uri,
|
@@ -79,7 +77,6 @@ module Lita
|
|
79
77
|
for i in a do
|
80
78
|
text = i.text.delete(" ").strip
|
81
79
|
if text == "Large"
|
82
|
-
puts(i['href'].split("?")[0])
|
83
80
|
url = i['href'].split("?")[0]
|
84
81
|
end
|
85
82
|
end
|
data/lita-retrotext.gemspec
CHANGED
Binary file
|
Binary file
|
@@ -7,7 +7,7 @@ describe Lita::Handlers::RetroText, lita_handler: true do
|
|
7
7
|
|
8
8
|
describe "#retrotext" do
|
9
9
|
it 'should display the url' do
|
10
|
-
send_message("Lita retro
|
10
|
+
send_message("Lita retro Top_text Middle_text Bottom_text")
|
11
11
|
expect(replies[0]).to match(/^http:\/\/([a-zA-Z0-9\/_\-.]+)\.jpg/i)
|
12
12
|
end
|
13
13
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-retrotext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Grable
|
@@ -103,11 +103,14 @@ extra_rdoc_files: []
|
|
103
103
|
files:
|
104
104
|
- ".gitignore"
|
105
105
|
- Gemfile
|
106
|
+
- README.md
|
106
107
|
- Rakefile
|
107
108
|
- lib/lita-retrotext.rb
|
108
109
|
- lib/lita/handlers/retrotext.rb
|
109
110
|
- lita-retrotext.gemspec
|
110
111
|
- locales/en.yml
|
112
|
+
- pkg/lita-retrotext-0.0.1.gem
|
113
|
+
- resources/sample.jpg
|
111
114
|
- spec/lita/handlers/retrotext_spec.rb
|
112
115
|
- spec/spec_helper.rb
|
113
116
|
homepage: https://github.com/rgrable/lita_retrotext
|