twitter_ebooks 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c48449c9a67d08ca0c981cc996544cbe6958639c
4
- data.tar.gz: c573c6dc652b271372c7eb9bca8f6608c7ab9d5c
3
+ metadata.gz: 390a63f64626e335217ffb9811d52a50748266a3
4
+ data.tar.gz: b4003f8f20e49e366c5dfed98f67ea2fa6cb4b30
5
5
  SHA512:
6
- metadata.gz: 46cde7be6f2b67aaaa74ec06e938d77297dd58c4482ea39db1848aa0350507d818883afa873e4828da5c6048eaebf35234bcc05d32af067c9c6f4110640abc05
7
- data.tar.gz: 1efc7ef315accfb471016b5bb5769c63679afebebf482dc6a2c6c43182a74eaea77561acec9a087784dd3b60b5da2d9f19ce47f3b85f36c452bd07a0239ea3e9
6
+ metadata.gz: 1415f8bd63dc8e526db1c474c867a37c4fc5da57ea8e1abd7940dc57685813665158caad1c4173baadf9e647dade1e5e82abb3a235d8efe400cf515dbceae437
7
+ data.tar.gz: e4f5fc8aec27b1fef84f6da6b6878d4c471c9a21dd0910da2ebad0b872bf4ce229f6c6ec12f15eec952a9257e94709dec39e559afa70a89c27cdacd85ecc8ee7
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # twitter\_ebooks 2.2.2
1
+ # twitter\_ebooks 2.2.3
2
2
 
3
3
  Rewrite of my twitter\_ebooks code. While the original was solely a tweeting Markov generator, this framework helps you build any kind of interactive twitterbot which responds to mentions/DMs.
4
4
 
@@ -63,7 +63,7 @@ The underlying [tweetstream](https://github.com/tweetstream/tweetstream) and [tw
63
63
  twitter\_ebooks comes with a syncing tool to download and then incrementally update a local json archive of a user's tweets.
64
64
 
65
65
  ``` zsh
66
- ➜ ebooks archive 0xabad1dea corpus/0xabad1dea.json
66
+ ➜ ebooks archive 0xabad1dea corpus/0xabad1dea.json
67
67
  Currently 20209 tweets for 0xabad1dea
68
68
  Received 67 new tweets
69
69
  ```
@@ -75,7 +75,7 @@ The first time you'll run this, it'll ask for auth details to connect with. Due
75
75
  In order to use the included text modeling, you'll first need to preprocess your archive into a more efficient form:
76
76
 
77
77
  ``` zsh
78
- ➜ ebooks consume corpus/0xabad1dea.json
78
+ ➜ ebooks consume corpus/0xabad1dea.json
79
79
  Reading json corpus from corpus/0xabad1dea.json
80
80
  Removing commented lines and sorting mentions
81
81
  Segmenting text into sentences
@@ -84,7 +84,7 @@ Ranking keywords
84
84
  Corpus consumed to model/0xabad1dea.model
85
85
  ```
86
86
 
87
- Notably, this works with both json tweet archives and plaintext files (based on file extension), so you can make a model out of any kind of text.
87
+ Notably, this works with both json tweet archives and plaintext files (based on file extension), so you can make a model out of any kind of text.
88
88
 
89
89
  Text files use newlines and full stops to seperate statements.
90
90
 
@@ -103,7 +103,8 @@ module Ebooks
103
103
  mless = ev[:text]
104
104
  begin
105
105
  ev.attrs[:entities][:user_mentions].reverse.each do |entity|
106
- mless = mless[0...entity[:indices][0]] + mless[entity[:indices][1]..-1].strip
106
+ last = mless[entity[:indices][1]..-1]||''
107
+ mless = mless[0...entity[:indices][0]] + last.strip
107
108
  end
108
109
  rescue Exception
109
110
  p ev.attrs[:entities][:user_mentions]
@@ -1,3 +1,3 @@
1
1
  module Ebooks
2
- VERSION = "2.2.2"
2
+ VERSION = "2.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_ebooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaiden Mispy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-25 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  requirements: []
194
194
  rubyforge_project:
195
- rubygems_version: 2.2.2
195
+ rubygems_version: 2.2.1
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: Markov chains for all your friends~