Coder Social home page Coder Social logo

twitter_ebooks's People

Contributors

alyssais avatar b0073d avatar boodoo avatar fluffypira avatar geal avatar gotos avatar hiramiya avatar ineffyble avatar kivikakk avatar negatendo avatar paulfri avatar petelawler avatar rachelhyman avatar richo avatar sferik avatar wayspurrchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twitter_ebooks's Issues

ebooks auth doesn't work

ebooks auth produces this error:

/usr/local/rvm/gems/ruby-2.1.5@global/gems/twitter_ebooks-3.0.2/bin/ebooks:185:in `require': cannot load such file -- oauth (LoadError)
        from /usr/local/rvm/gems/ruby-2.1.5@global/gems/twitter_ebooks-3.0.2/bin/ebooks:185:in `auth'
        from /usr/local/rvm/gems/ruby-2.1.5@global/gems/twitter_ebooks-3.0.2/bin/ebooks:325:in `command'
        from /usr/local/rvm/gems/ruby-2.1.5@global/gems/twitter_ebooks-3.0.2/bin/ebooks:339:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.1.5/bin/ebooks:23:in `load'
        from /usr/local/rvm/gems/ruby-2.1.5/bin/ebooks:23:in `<main>'
        from /usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
        from /usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'

I think it might be because you forgot to add 'oauth' to your gem dependencies, but you're requiring it.

Feature request: automatically detect username from OAuth token

Currently, to add a bot, one would have to paste in both the username and the authentication tokens: this can lead to frustration if the username is misspelled, as the token would allow the bot to login, but no tweets would be processed.
If you GET account/verify_credentials, Twitter will send you the user information of the currently authenticated user, which contains the username - so that one would not need to hardcode the username.
In addition, this also allows a user to change the username that the bot is tweeting from without changing the code.

issue running 'ebooks archive' a second time

Running 'ebooks archive' to download my tweets worked fine the first time, but subsequent attempts to run it result in the following error:

Faraday::Builder is now Faraday::RackBuilder.
/usr/lib/ruby/1.9.1/json/common.rb:148:in encode': "\xC2" on US-ASCII (Encoding::InvalidByteSequenceError) from /usr/lib/ruby/1.9.1/json/common.rb:148:ininitialize'
from /usr/lib/ruby/1.9.1/json/common.rb:148:in new' from /usr/lib/ruby/1.9.1/json/common.rb:148:inparse'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/lib/twitter_ebooks/archive.rb:50:in initialize' from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/bin/ebooks:115:innew'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/bin/ebooks:115:in archive' from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/bin/ebooks:207:incommand'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/bin/ebooks:217:in <top (required)>' from /usr/local/bin/ebooks:23:inload'
from /usr/local/bin/ebooks:23:in `

'

Error on close

Under Yosemite when I use Control-C to quit I get

^C/Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:268:in `join': Interrupt
    from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:268:in `each'
    from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:268:in `start'
    from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:329:in `command'
    from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:339:in `<top (required)>'
    from /Users/ezmyrelda/.rvm/rubies/ruby-2.0.0-p598/bin/ebooks:23:in `load'
    from /Users/ezmyrelda/.rvm/rubies/ruby-2.0.0-p598/bin/ebooks:23:in `<main>'
    from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `eval'
    from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `<main>'

Is there some way I can fix this?

Can't create new ebooks

Just installed via gem on Ubuntu : and got this error.

v21@boris:~$ ebooks new v21_ebooks
/usr/local/bin/ebooks:19:in `load': /var/lib/gems/1.8/gems/twitter_ebooks-2.2.1/bin/ebooks:159: odd number list for Hash (SyntaxError)
tweet = { text: l }
^
/var/lib/gems/1.8/gems/twitter_ebooks-2.2.1/bin/ebooks:159: syntax error, unexpected ':', expecting '}'
tweet = { text: l }
^
from /usr/local/bin/ebooks:19

shuffle and sample both used in SuffixGenerator.generate

In SuffixGenerator.generate, there is this code:

start = site[0]

site[1].shuffle.each do |alt|
  start, alt = site[0], site[1].sample
  ...
end

The shuffle and and the sample seem to be performing the same job and it could be turned into:

start = site[0]

site[1].shuffle.each do |alt|
  ...
end

with no change (other than the obvious pulling from a random source one less time).

infinite loop in very small models

If a model has very few tokens (say, there's only two tweets and two words in each), Model#make_statement will fall into an infinite loop because the generated tiki array will always be smaller than 3.

This line causes it.

I was able to get this to happen with only two sentences being sent to consume_lines before calling make_statement: 'foobar baz"' and 'foobar quux'.

Obviously, this is very edge-case-y.

on_retweet event

Is there an event triggered in the streaming API for a retweet? Would it be possible or desireable to add a way to create an on_retweet handler? Maybe this is already possible? Currently I schedule a job to check for rewteets in the REST API. I would like to know about retweets sooner than I can with a scheduled job.

My use case is when someone retweets an image my bot created the bot then further manipulates that image as a way to thank them. (BTW, including #noRT in the retweet disables this feature in order to be nice for those who do not want a response.)

Hard crash if TweetStream fails to hold a connection

/home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/tweetstream-2.5.0/lib/tweetstream/client.rb:436:in `block in connect': Failed to reconnect after 11 tries. (TweetStream::ReconnectError)
        from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:296:in `call'
        from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:296:in `invoke_callback'
        from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:268:in `rescue in schedule_reconnect'
        from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:263:in `schedule_reconnect'
        from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:93:in `unbind'
        from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:1440:in `event_callback'
        from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
        from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
        from run.rb:5:in `<main>'
$

Logging for archive function?

Something has happened in the twitter source I use for my bot, as now when I attempt to execute ebooks archive against it, it throws an exception.

Problem is, the archive output overfills the buffer and I can't see what it's choking on.

Any suggestions one how to get some type of logging of the output of archive when it errors, to find out what is messed up in the source?

Cant launch :(

First of all just saying I'm on Mac OS X Yosemite

When I try and run the bot after setting it up, using the command: 'ruby run.rb' and from the directory of the my_ebooks folder, I get this error:

Faraday::Builder is now Faraday::RackBuilder.
/Users/Rafi/Desktop/my_ebooks/bots.rb:12:in <top (required)>': undefined methodโ€œraf_ebooks' for main:Object (NoMethodError)
from run.rb:32:in require_relative' from run.rb:32:in

'

What does this mean?

Thanks

Exception on mention

I got this stacktrace when someone mentioned my bot

#<NoMethodError: undefined method `each_with_index' for nil:NilClass>
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/suffix.rb:59:in `block in generate'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/suffix.rb:56:in `upto'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/suffix.rb:56:in `generate'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:220:in `make_statement'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:288:in `make_response'
        bots.rb:63:in `block in on_mention'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:353:in `call'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:353:in `delay'
        bots.rb:61:in `on_mention'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:344:in `fire'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:287:in `receive_event'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:334:in `block in start'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/client.rb:115:in `block in request'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:27:in `call'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:27:in `block in on_body'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:25:in `each'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:25:in `on_body'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:16:in `<<'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:16:in `<<'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/connection.rb:22:in `stream'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/client.rb:118:in `request'
        /home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/client.rb:91:in `user'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:333:in `start'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/bin/ebooks:261:in `block (3 levels) in start'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/bin/ebooks:259:in `loop'
        /home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/bin/ebooks:259:in `block (2 levels) in start'

It appears to happen only on a specific phrase ("ื‘ื“ื™ื•ืง!")... I've reproduced it with two different models (in the console using model.make_statement), it appears to only affect models of users which mostly tweet in Hebrew. Removing the exclamation mark produces a valid result and no exception.

can't get 'ebooks archive' to authenticate

I was having this problem with an older 2.x version as well. I thought it might have been a ruby 1.9 problem so I upgraded to ruby 2.0, but the problem still persists:

(21:42:56) tape@charles:~/twitter_ebooks/tape> ebooks archive tape
New archive for @Tape at corpus/tape.json
/var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/response/raise_error.rb:15:in on_complete': Could not authenticate you (Twitter::Error::Unauthorized) from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:9:inblock in call'
from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:57:in on_complete' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:8:incall'
from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/request/url_encoded.rb:15:in call' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/request/multipart.rb:14:incall'
from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/request/multipart_with_file.rb:17:in call' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:inbuild_response'
from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in run_request' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/connection.rb:140:inget'
from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/request.rb:33:in perform' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/utils.rb:51:inperform_request'
from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/utils.rb:96:in perform_request_with_objects' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/utils.rb:140:inobjects_from_response_with_user'
from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/timelines.rb:49:in user_timeline' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:77:inblock in sync'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:74:in loop' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:74:insync'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:152:in archive' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:324:incommand'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:341:in <top (required)>' from /usr/local/bin/ebooks:23:inload'
from /usr/local/bin/ebooks:23:in `

'

currently have twitter_ebooks 3.0.4.

SSL_connect returned=1 e rrno=0 state=SSLv3 read server certificate B: certificate verify failed (Twitter ::Error::ClientError)

C:\Ruby193\devkit\my_ebooks>ebooks tweet C:\Ruby193\devkit\my_ebooks\model\my_eb
ooks.model TheTaZe_ebooks
Faraday::Builder is now Faraday::RackBuilder.
Rending a video in After Effects.
Rending a video that will take about 4 hours.
Rending a video that will take about an hour to render.
@TheTaZe_ebooks: Rending a video that I click on have to be a British guy?
@TheTaZe_ebooks: Tweeting ["Rending a video that I click on have to be a British
guy?"]
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:800:in connect': SSL_connect returned=1 e rrno=0 state=SSLv3 read server certificate B: certificate verify failed (Twitter ::Error::ClientError) from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:800:inblock in connect'
from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:69:in timeout' from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:100:intimeout'
from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:800:in connect' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:756:indo_start'
from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:745:in start' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1285:inrequest'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/adapt
er/net_http.rb:80:in perform_request' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/adapt er/net_http.rb:39:incall'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/respo
nse.rb:8:in call' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/respo nse.rb:8:incall'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/respo
nse.rb:8:in call' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/reque st/url_encoded.rb:15:incall'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/reque
st/multipart.rb:14:in call' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/reque st/multipart_with_file.rb:14:incall'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/rack_
builder.rb:139:in build_response' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/conne ction.rb:377:inrun_request'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/conne
ction.rb:177:in post' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/clien t.rb:108:inrequest'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/clien
t.rb:72:in post' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/api/u tils.rb:82:inobject_from_response'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/api/t
weets.rb:129:in update' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter_ebooks-2.3.2/lib/twitte r_ebooks/bot.rb:164:intweet'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks
:137:in tweet' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks :208:incommand'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks
:217:in <top (required)>' from C:/Ruby193/bin/ebooks:23:inload'
from C:/Ruby193/bin/ebooks:23:in `

'

I have been getting this error and I don't know what to do with it?

Bot model load error due to model.rb:49 TypeError

From the logs:

Dec 19 11:10:29 urvxt-urabe heroku/worker.1:  State changed from crashed to starting 
Dec 19 11:10:32 urvxt-urabe heroku/worker.1:  Starting process with command `bundle exec ebooks start` 
Dec 19 11:10:33 urvxt-urabe heroku/worker.1:  State changed from starting to up 
Dec 19 11:10:34 urvxt-urabe app/worker.1:  DISCLAIMER: This version of urvxt-urabe is modified specifically for Heroku deployment. 
Dec 19 11:10:34 urvxt-urabe app/worker.1:  Compatible with twitter_ebooks 3.x 
Dec 19 11:10:34 urvxt-urabe app/worker.1:  @weetabix_ebooks: Loading model  
Dec 19 11:10:34 urvxt-urabe app/worker.1:  /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:49:in `initialize': no implicit conversion of nil into String (TypeError)  
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:49:in `open' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:49:in `block in load' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:48:in `instance_eval' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:48:in `load' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from bots.rb:207:in `load_model!' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from bots.rb:40:in `configure' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:183:in `initialize' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from bots.rb:212:in `new' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from bots.rb:212:in `newbot' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from bots.rb:223:in `<top (required)>' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:307:in `load' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:307:in `load_bots' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:238:in `start' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:331:in `command' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:342:in `<top (required)>' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/bin/ebooks:23:in `load' 
Dec 19 11:10:34 urvxt-urabe app/worker.1:   from /app/vendor/bundle/ruby/2.1.0/bin/ebooks:23:in `<main>' 
Dec 19 11:10:35 urvxt-urabe heroku/worker.1:  Process exited with status 1 
Dec 19 11:10:35 urvxt-urabe heroku/worker.1:  State changed from up to crashed 

All the models are rebuilt using twitter_ebooks 3.0.6. Same error occurs when running 3.0.4.

Feature Request: Twitter Archive support

Twitter has an option to download your archive of tweets all the way back, and it generally takes only a few minutes. It gives you the tweets in a big CSV, as well as JSON files divided by month. It would be nice to be able to use this as the corpus. I havent had the time to delve into the code to see how the current corpus is generated, but it probably wouldnt be too hard to parse it and generate a corpus in your current format.

No unicode in keywords

When I use unicode input, all keywords get cutoff at that unicode. I found the reason.
In nlp.rb, line 102:

set :word_pattern, /(?<!@)(?<=\s)[\w']+/

should be

set :word_pattern, /(?<!@)(?<=\s)[\p{Word}']+/

Feature request: Better rate-limiting tolerance

twitter_ebooks can't seem to handle rate-limiting and instead crashes (my use case is just the archive subcommand, I don't know if this is true in the rest of the subcommands)

This is a feature request to instead keep twitter_ebooks running, delay, and retry. This could possibly enabled via a command-line option switch, possibly be always-on.

`on_startup` doesn't seem to happen ever...

Hey; I'm on the latest version of twitter_ebooks. I have my bot running on Heroku, and it doesn't seem to be tweeting. My on_startup usually looks like this:

def on_startup
  #10% chance to make a tweet in any hour
  if rand > 0.9
    tweet(model.make_statement)
  end
end

My bot hasn't written its own tweet in almost two weeks. This started right about the time I upgraded to the latest major version of twitter_ebooks. To debug, I removed the conditional statement. So, after deploys, my bot should be immediately tweeting. But it isn't. A quick call of heroku logs also shows no errors. Only that my bot is streaming tweets. This makes me think there might be something up with the on_startup method... Any thoughts?

Unable to install via gem

When trying to install the software through gem on Mac OS, the following error occurs when gem tries to compile:

linking shared-object rubyeventmachine.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [rubyeventmachine.bundle] Error 1

The error seems to stem from a change in Xcode 5.1 which removed GCC in favour of clang, but I could not get it to run, even when using the exports described in the linked Stackoverflow post.

I realise this is not exactly a problem in your code, just wanted to give a heads-up and a place for other users to compare notes.

My full terminal log is below.

bash-3.2# gem install twitter_ebooks
Building native extensions.  This could take a while...
ERROR:  Error installing twitter_ebooks:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
creating Makefile

make "DESTDIR="
compiling binder.cpp
compiling cmain.cpp
compiling ed.cpp
compiling em.cpp
compiling kb.cpp
compiling page.cpp
compiling pipe.cpp
compiling rubymain.cpp
rubymain.cpp:330:17: warning: 'BIO_s_mem' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                out = BIO_new(BIO_s_mem());
                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:626:13: note: 'BIO_s_mem' declared here
BIO_METHOD *BIO_s_mem(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
            ^
rubymain.cpp:330:9: warning: 'BIO_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                out = BIO_new(BIO_s_mem());
                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:591:7: note: 'BIO_new' declared here
BIO *   BIO_new(BIO_METHOD *type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
rubymain.cpp:332:3: warning: 'BIO_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                BIO_get_mem_ptr(out, &buf);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:506:31: note: expanded from macro 'BIO_get_mem_ptr'
#define BIO_get_mem_ptr(b,pp)   BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0,(char *)pp)
                                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:600:6: note: 'BIO_ctrl' declared here
long    BIO_ctrl(BIO *bp,int cmd,long larg,void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
rubymain.cpp:335:3: warning: 'BIO_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                BIO_free(out);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:593:5: note: 'BIO_free' declared here
int     BIO_free(BIO *a) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
4 warnings generated.
compiling ssl.cpp
ssl.cpp:97:13: warning: 'BIO_new_mem_buf' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        BIO *bio = BIO_new_mem_buf (PrivateMaterials, -1);
                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:627:6: note: 'BIO_new_mem_buf' declared here
BIO *BIO_new_mem_buf(void *buf, int len) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
ssl.cpp:102:3: warning: 'EVP_PKEY_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                EVP_PKEY_free (DefaultPrivateKey);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/evp.h:885:7: note: 'EVP_PKEY_free' declared here
void            EVP_PKEY_free(EVP_PKEY *pkey) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
                ^
ssl.cpp:114:2: warning: 'BIO_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        BIO_free (bio);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:593:5: note: 'BIO_free' declared here
int     BIO_free(BIO *a) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:138:3: warning: 'SSL_library_init' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                SSL_library_init();
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1553:5: note: 'SSL_library_init' declared here
int SSL_library_init(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:139:3: warning: 'SSL_library_init' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                OpenSSL_add_ssl_algorithms();
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1141:38: note: expanded from macro 'OpenSSL_add_ssl_algorithms'
#define OpenSSL_add_ssl_algorithms()    SSL_library_init()
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1553:5: note: 'SSL_library_init' declared here
int SSL_library_init(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:140:3: warning: 'OPENSSL_add_all_algorithms_noconf' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                OpenSSL_add_all_algorithms();
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/evp.h:836:3: note: expanded from macro 'OpenSSL_add_all_algorithms'
                OPENSSL_add_all_algorithms_noconf()
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/evp.h:828:6: note: 'OPENSSL_add_all_algorithms_noconf' declared here
void OPENSSL_add_all_algorithms_noconf(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
ssl.cpp:141:3: warning: 'SSL_load_error_strings' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                SSL_load_error_strings();
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1416:6: note: 'SSL_load_error_strings' declared here
void    SSL_load_error_strings(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:142:3: warning: 'ERR_load_crypto_strings' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                ERR_load_crypto_strings();
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:296:6: note: 'ERR_load_crypto_strings' declared here
void ERR_load_crypto_strings(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
ssl.cpp:148:34: warning: 'SSLv23_server_method' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        pCtx = SSL_CTX_new (is_server ? SSLv23_server_method() : SSLv23_client_method());
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1516:13: note: 'SSLv23_server_method' declared here
SSL_METHOD *SSLv23_server_method(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;   /* SSLv3 but can rollback to v2 */
            ^
ssl.cpp:148:59: warning: 'SSLv23_client_method' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        pCtx = SSL_CTX_new (is_server ? SSLv23_server_method() : SSLv23_client_method());
                                                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1517:13: note: 'SSLv23_client_method' declared here
SSL_METHOD *SSLv23_client_method(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;   /* SSLv3 but can rollback to v2 */
            ^
ssl.cpp:148:9: warning: 'SSL_CTX_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        pCtx = SSL_CTX_new (is_server ? SSLv23_server_method() : SSLv23_client_method());
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1346:10: note: 'SSL_CTX_new' declared here
SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
         ^
ssl.cpp:152:2: warning: 'SSL_CTX_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        SSL_CTX_set_options (pCtx, SSL_OP_ALL);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:571:2: note: expanded from macro 'SSL_CTX_set_options'
        SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1498:6: note: 'SSL_CTX_ctrl' declared here
long    SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:162:8: warning: 'SSL_CTX_use_PrivateKey_file' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        e = SSL_CTX_use_PrivateKey_file (pCtx, privkeyfile.c_str(), SSL_FILETYPE_PEM);
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1401:5: note: 'SSL_CTX_use_PrivateKey_file' declared here
int     SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:164:8: warning: 'SSL_CTX_use_PrivateKey' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        e = SSL_CTX_use_PrivateKey (pCtx, DefaultPrivateKey);
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1466:5: note: 'SSL_CTX_use_PrivateKey' declared here
int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:165:15: warning: 'ERR_print_errors_fp' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                if (e <= 0) ERR_print_errors_fp(stderr);
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:287:6: note: 'ERR_print_errors_fp' declared here
void ERR_print_errors_fp(FILE *fp) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
ssl.cpp:169:8: warning: 'SSL_CTX_use_certificate_chain_file' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        e = SSL_CTX_use_certificate_chain_file (pCtx, certchainfile.c_str());
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1403:5: note: 'SSL_CTX_use_certificate_chain_file' declared here
int     SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; /* PEM type */
        ^
ssl.cpp:171:8: warning: 'SSL_CTX_use_certificate' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        e = SSL_CTX_use_certificate (pCtx, DefaultCertificate);
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1469:5: note: 'SSL_CTX_use_certificate' declared here
int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:172:15: warning: 'ERR_print_errors_fp' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                if (e <= 0) ERR_print_errors_fp(stderr);
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:287:6: note: 'ERR_print_errors_fp' declared here
void ERR_print_errors_fp(FILE *fp) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
ssl.cpp:176:2: warning: 'SSL_CTX_set_cipher_list' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        SSL_CTX_set_cipher_list (pCtx, "ALL:!ADH:!LOW:!EXP:!DES-CBC3-SHA:@STRENGTH");
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1345:5: note: 'SSL_CTX_set_cipher_list' declared here
int     SSL_CTX_set_cipher_list(SSL_CTX *,const char *str) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:179:3: warning: 'SSL_CTX_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                SSL_CTX_sess_set_cache_size (pCtx, 128);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1604:2: note: expanded from macro 'SSL_CTX_sess_set_cache_size'
        SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL)
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1498:6: note: 'SSL_CTX_ctrl' declared here
long    SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:180:3: warning: 'SSL_CTX_set_session_id_context' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                SSL_CTX_set_session_id_context (pCtx, (unsigned char*)"eventmachine", 12);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1478:5: note: 'SSL_CTX_set_session_id_context' declared here
int     SSL_CTX_set_session_id_context(SSL_CTX *ctx,const unsigned char *sid_ctx,
        ^
ssl.cpp:185:8: warning: 'SSL_CTX_use_PrivateKey_file' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        e = SSL_CTX_use_PrivateKey_file (pCtx, privkeyfile.c_str(), SSL_FILETYPE_PEM);
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1401:5: note: 'SSL_CTX_use_PrivateKey_file' declared here
int     SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:186:16: warning: 'ERR_print_errors_fp' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        if (e <= 0) ERR_print_errors_fp(stderr);
                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:287:6: note: 'ERR_print_errors_fp' declared here
void ERR_print_errors_fp(FILE *fp) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
ssl.cpp:190:8: warning: 'SSL_CTX_use_certificate_chain_file' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        e = SSL_CTX_use_certificate_chain_file (pCtx, certchainfile.c_str());
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1403:5: note: 'SSL_CTX_use_certificate_chain_file' declared here
int     SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; /* PEM type */
        ^
ssl.cpp:191:16: warning: 'ERR_print_errors_fp' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        if (e <= 0) ERR_print_errors_fp(stderr);
                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:287:6: note: 'ERR_print_errors_fp' declared here
void ERR_print_errors_fp(FILE *fp) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
ssl.cpp:206:3: warning: 'SSL_CTX_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                SSL_CTX_free (pCtx);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1347:6: note: 'SSL_CTX_free' declared here
void    SSL_CTX_free(SSL_CTX *) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:208:3: warning: 'EVP_PKEY_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                EVP_PKEY_free (PrivateKey);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/evp.h:885:7: note: 'EVP_PKEY_free' declared here
void            EVP_PKEY_free(EVP_PKEY *pkey) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
                ^
ssl.cpp:234:22: warning: 'BIO_s_mem' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        pbioRead = BIO_new (BIO_s_mem());
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:626:13: note: 'BIO_s_mem' declared here
BIO_METHOD *BIO_s_mem(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
            ^
ssl.cpp:234:13: warning: 'BIO_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        pbioRead = BIO_new (BIO_s_mem());
                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:591:7: note: 'BIO_new' declared here
BIO *   BIO_new(BIO_METHOD *type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:237:23: warning: 'BIO_s_mem' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        pbioWrite = BIO_new (BIO_s_mem());
                             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:626:13: note: 'BIO_s_mem' declared here
BIO_METHOD *BIO_s_mem(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
            ^
ssl.cpp:237:14: warning: 'BIO_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        pbioWrite = BIO_new (BIO_s_mem());
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:591:7: note: 'BIO_new' declared here
BIO *   BIO_new(BIO_METHOD *type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:240:9: warning: 'SSL_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        pSSL = SSL_new (Context->pCtx);
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1481:7: note: 'SSL_new' declared here
SSL *   SSL_new(SSL_CTX *ctx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:242:2: warning: 'SSL_set_bio' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        SSL_set_bio (pSSL, pbioRead, pbioWrite);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1375:6: note: 'SSL_set_bio' declared here
void    SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:245:2: warning: 'SSL_set_ex_data' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        SSL_set_ex_data(pSSL, 0, (void*) binding);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1586:5: note: 'SSL_set_ex_data' declared here
int SSL_set_ex_data(SSL *ssl,int idx,void *data) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:248:3: warning: 'SSL_set_verify' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                SSL_set_verify(pSSL, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, ssl_verify_wrapper);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1384:6: note: 'SSL_set_verify' declared here
void    SSL_set_verify(SSL *s, int mode,
        ^
ssl.cpp:251:3: warning: 'SSL_connect' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                SSL_connect (pSSL);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1492:6: note: 'SSL_connect' declared here
int     SSL_connect(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:264:7: warning: 'SSL_get_shutdown' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                if (SSL_get_shutdown (pSSL) & SSL_RECEIVED_SHUTDOWN)
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1568:5: note: 'SSL_get_shutdown' declared here
int SSL_get_shutdown(const SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:265:4: warning: 'SSL_shutdown' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        SSL_shutdown (pSSL);
                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1532:5: note: 'SSL_shutdown' declared here
int SSL_shutdown(SSL *s) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:267:4: warning: 'SSL_clear' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        SSL_clear (pSSL);
                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1353:5: note: 'SSL_clear' declared here
int     SSL_clear(SSL *s) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:268:3: warning: 'SSL_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                SSL_free (pSSL);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1490:6: note: 'SSL_free' declared here
void    SSL_free(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:285:10: warning: 'BIO_write' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        int n = BIO_write (pbioRead, buf, bufsize);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:597:5: note: 'BIO_write' declared here
int     BIO_write(BIO *b, const void *data, int len) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:297:7: warning: 'SSL_state' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        if (!SSL_is_init_finished (pSSL)) {
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1115:35: note: expanded from macro 'SSL_is_init_finished'
#define SSL_is_init_finished(a)         (SSL_state(a) == SSL_ST_OK)
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1581:5: note: 'SSL_state' declared here
int SSL_state(const SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:298:23: warning: 'SSL_accept' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                int e = bIsServer ? SSL_accept (pSSL) : SSL_connect (pSSL);
                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1491:6: note: 'SSL_accept' declared here
int     SSL_accept(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:298:43: warning: 'SSL_connect' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                int e = bIsServer ? SSL_accept (pSSL) : SSL_connect (pSSL);
                                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1492:6: note: 'SSL_connect' declared here
int     SSL_connect(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:300:13: warning: 'SSL_get_error' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        int er = SSL_get_error (pSSL, e);
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1501:5: note: 'SSL_get_error' declared here
int     SSL_get_error(const SSL *s,int ret_code) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:312:7: warning: 'SSL_state' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        if (!SSL_is_init_finished (pSSL)) {
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1115:35: note: expanded from macro 'SSL_is_init_finished'
#define SSL_is_init_finished(a)         (SSL_state(a) == SSL_ST_OK)
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1581:5: note: 'SSL_state' declared here
int SSL_state(const SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:321:10: warning: 'SSL_read' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        int n = SSL_read (pSSL, buf, bufsize);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1493:6: note: 'SSL_read' declared here
int     SSL_read(SSL *ssl,void *buf,int num) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:326:7: warning: 'SSL_get_error' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                if (SSL_get_error (pSSL, n) == SSL_ERROR_WANT_READ) {
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1501:5: note: 'SSL_get_error' declared here
int     SSL_get_error(const SSL *s,int ret_code) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:346:9: warning: 'BIO_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        return BIO_pending (pbioWrite) ? true : false;
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:524:30: note: expanded from macro 'BIO_pending'
#define BIO_pending(b)          (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
                                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:600:6: note: 'BIO_ctrl' declared here
long    BIO_ctrl(BIO *bp,int cmd,long larg,void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:360:9: warning: 'BIO_read' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        return BIO_read (pbioWrite, buf, bufsize);
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:595:5: note: 'BIO_read' declared here
int     BIO_read(BIO *b, void *data, int len) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:390:7: warning: 'SSL_state' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        if (!SSL_is_init_finished (pSSL))
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1115:35: note: expanded from macro 'SSL_is_init_finished'
#define SSL_is_init_finished(a)         (SSL_state(a) == SSL_ST_OK)
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1581:5: note: 'SSL_state' declared here
int SSL_state(const SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:401:11: warning: 'SSL_write' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                int n = SSL_write (pSSL, page, length);
                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1495:6: note: 'SSL_write' declared here
int     SSL_write(SSL *ssl,const void *buf,int num) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:407:13: warning: 'SSL_get_error' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                        int er = SSL_get_error (pSSL, n);
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1501:5: note: 'SSL_get_error' declared here
int     SSL_get_error(const SSL *s,int ret_code) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:432:10: warning: 'SSL_get_peer_certificate' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
                cert = SSL_get_peer_certificate(pSSL);
                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1450:8: note: 'SSL_get_peer_certificate' declared here
X509 *  SSL_get_peer_certificate(const SSL *s) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:451:9: warning: 'X509_STORE_CTX_get_current_cert' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        cert = X509_STORE_CTX_get_current_cert(ctx);
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/x509_vfy.h:454:8: note: 'X509_STORE_CTX_get_current_cert' declared here
X509 *  X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:452:47: warning: 'SSL_get_ex_data_X509_STORE_CTX_idx' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        ssl = (SSL*) X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
                                                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1601:5: note: 'SSL_get_ex_data_X509_STORE_CTX_idx' declared here
int SSL_get_ex_data_X509_STORE_CTX_idx(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
    ^
ssl.cpp:452:15: warning: 'X509_STORE_CTX_get_ex_data' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        ssl = (SSL*) X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/x509_vfy.h:450:8: note: 'X509_STORE_CTX_get_ex_data' declared here
void *  X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:453:28: warning: 'SSL_get_ex_data' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        binding = (unsigned long) SSL_get_ex_data(ssl, 0);
                                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1587:7: note: 'SSL_get_ex_data' declared here
void *SSL_get_ex_data(const SSL *ssl,int idx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
ssl.cpp:455:16: warning: 'BIO_s_mem' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        out = BIO_new(BIO_s_mem());
                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:626:13: note: 'BIO_s_mem' declared here
BIO_METHOD *BIO_s_mem(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
            ^
ssl.cpp:455:8: warning: 'BIO_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        out = BIO_new(BIO_s_mem());
              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:591:7: note: 'BIO_new' declared here
BIO *   BIO_new(BIO_METHOD *type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:457:2: warning: 'BIO_write' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        BIO_write(out, "\0", 1);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:597:5: note: 'BIO_write' declared here
int     BIO_write(BIO *b, const void *data, int len) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:458:2: warning: 'BIO_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        BIO_get_mem_ptr(out, &buf);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:506:31: note: expanded from macro 'BIO_get_mem_ptr'
#define BIO_get_mem_ptr(b,pp)   BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0,(char *)pp)
                                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:600:6: note: 'BIO_ctrl' declared here
long    BIO_ctrl(BIO *bp,int cmd,long larg,void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
ssl.cpp:462:2: warning: 'BIO_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        BIO_free(out);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:593:5: note: 'BIO_free' declared here
int     BIO_free(BIO *a) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
63 warnings generated.
linking shared-object rubyeventmachine.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [rubyeventmachine.bundle] Error 1


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/eventmachine-1.0.3 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/eventmachine-1.0.3/ext/gem_make.out
bash-3.2# ruby

Possibly PEBCAK issue

I have generated the model, and added in all the auth stuff in my generated bot. But when I run
ruby run.rb
it all fires up just fine, but nothing ever happens. I'm fairly certain it doesn't actually connect to twitter, either, as I replace the keys, secrets, and tokens with gibberish (or even completely comment them out) and it still fires up without error.

I'm sure I'm missing something here. My steps:

  1. Create app under the twitter account that will be my bot (let's call it 'mattbot' - NOTE: That is NOT the real account name)
  2. Ensure that the app has r/w/dm rights. Generate oauth token for mattbot under that app
  3. Run ebooks new mattbot to create the new repo
  4. Edit the bots.rb in the mattbot repo to put in all the keys, secrets, tokens, et al
  5. Uncomment out a few handlers in bots.rb:
  bot.on_mention do |tweet, meta|
    # Reply to a mention
    bot.reply(tweet, meta[:reply_prefix] + "oh hullo")
  end

  bot.on_timeline do |tweet, meta|
    # Reply to a tweet in the bot's timeline
    bot.reply(tweet, meta[:reply_prefix] + "nice tweet")
  end
  1. Within the mattbot repo, enter ruby run.rb
๏ฃฟ ~/src/mattbot/ [master] ruby run.rb
Faraday::Builder is now Faraday::RackBuilder.
@mattbot: starting stream for petechesbot
@mattbot: Online!
  1. Attempt to reply to mattbot on twitter
  2. Nothing happens
  3. Edit bots.rb and comment out all lines with secret keys, etc
  4. Attempt to ruby run.rb again
  5. Same result

What am I missing?

_For the record, I tried this all by pushing it to heroku first, with much the same result. I switched back to running ruby run.rb locally for efficiency of troubleshooting_

on_message doesn't seem to ever be called

Nothing in on_message is getting run when I try to send my bots a message. I know my bot does have access to direct messages because I can see my bot receiving direct messages in its logs.

Bot runs but doesn't tweet

While ebooks tweet <model_path> works just fine and I'm able to send as many tweets I like through this method, using ebooks start displays this.
ebooks start
While running, the bot will report follows, mentions and the like but it never tweets or replies. Am I missing something or is there a fix?

2.3.2 not compatiable with 2.2.* models? undefined method `[]' for #<Ebooks::Model:0x000000015c5908>

When I attempt to run ebooks gen model/mymodel.model, I get:

Faraday::Builder is now Faraday::RackBuilder.
/var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/lib/twitter_ebooks/model.rb:21:in `block in load': undefined method `[]' for #<Ebooks::Model:0x000000015c5908> (NoMethodError)
    from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/lib/twitter_ebooks/model.rb:19:in `instance_eval'
    from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/lib/twitter_ebooks/model.rb:19:in `load'
    from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks:77:in `gen'
    from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks:205:in `command'
    from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks:217:in `<top (required)>'
    from /usr/local/bin/ebooks:23:in `load'
    from /usr/local/bin/ebooks:23:in `<main>'

I'm using Twitter_ebooks 2.3.2 on Ubuntu 14.04 with Ruby 1.9.1. This model was generated on one of the 2.2.* versions; using this with a 2.3.2-generated model worked fine.

CONFIG_PATH variable invalid for OS X

On OS X Mountain Lion and Mavericks, archive.rb will be placed in a path such as: /Library/Ruby/Gems/2.0.0/gems/twitter_ebooks-2.1.5/lib/twitter_ebooks/archive.rb

The CONFIG_PATH variable is set to "/home/#{ENV['USER']}/.ebooksrc" but that doesn't exist on OS X, so an error occurs when trying to initiate a repo. Could we make this more relative so it works on both Linux and Unix systems?

For OS X, the correct path is "/Users/[user]/.ebooksrc" - would replacing it with ${HOME} work in this case?

can't update csv import with archive command

Tried converting the csv with jsonify command, then used archive. Gave me an error with:

/twitter-4.8.1/lib/twitter/response/raise_error.rb:21:in `on_complete': since_id parameter is invalid. (Twitter::Error::BadRequest)

bot.tweet() (from ebooksinstance/bots.rb) failing with undefined method `update'

@wota_ebooks: Tweeting ["FBI is part of why I want the Diary."]
/home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.8/lib/twitter_ebooks/bot.rb:163:in tweet': undefined methodupdate' for nil:NilClass (NoMethodError)
from /home/kyanha/work/ebooks/wota_ebooks/bots.rb:18:in block in <top (required)>' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.8/lib/twitter_ebooks/bot.rb:28:incall'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.8/lib/twitter_ebooks/bot.rb:28:in initialize' from /home/kyanha/work/ebooks/wota_ebooks/bots.rb:8:innew'
from /home/kyanha/work/ebooks/wota_ebooks/bots.rb:8:in <top (required)>' from run.rb:3:inrequire_relative'
from run.rb:3:in `

'

tests failing because of uninitialized constant GC::INTERNAL_CONSTANTS

I'm having trouble getting the provided tests to run without failures. It seems the memory profiling bits might be missing something in my environment. Has anyone else experienced this issue?

Failures:

  1. Ebooks::Model consumes, saves and loads models correctly
    Failure/Error: report = MemoryUsage.report do
    NameError:
    uninitialized constant GC::INTERNAL_CONSTANTS

    ./spec/memprof.rb:11:in `report'

    ./spec/model_spec.rb:28:in`block (2 levels) in <top (required)>'

when variant is nil, multiple passes are performed to no avail

When no suitable sentence is found and variant is nil in SuffixGenerator.generate, the upto loop is not exited, and no changes are done to find another sentence before looping again on the same tikis variable (which will always get the same result). This means that the same work is being done for every loop with no improvement.

What's supposed to happen there? I imagine a break. Something like replacing tikis = variant if variant with if variant; tikis = variant; else; break; end so that the caller of generate can try again.

Hard crash if bot tries to favourite a tweet a second time

I'm not entirely sure how this happened, but a bot appears to have received the same tweet multiple times in its timeline, and attempted both times to favourite it. This caused a You have already favorited this status. (Twitter::Error::Forbidden) to be thrown and for the bot to crash entirely.

occasional `random seed` error consuming archive

I can't figure out what causes this, but it doesn't happen all the time. A few days ago, it happened, but then on my next archive/consume cycle it didn't.

Just upgraded to 2.2.2 etc.

ebooks:19$ bin/ebooks consume corpus/zigg.json 
Faraday::Builder is now Faraday::RackBuilder.
Reading json corpus from corpus/zigg.json
Removing commented lines and sorting mentions
Segmenting text into sentences
Tokenizing 7411 statements and 9233 mentions
Ranking keywords
/home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/bloomfilter-rb-2.1.1/lib/bloomfilter/native.rb:20:in `new': random seed (ArgumentError)
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/bloomfilter-rb-2.1.1/lib/bloomfilter/native.rb:20:in `initialize'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:111:in `new'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:111:in `init_bloom_filter'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:41:in `initialize'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:31:in `new'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:31:in `load'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:13:in `load_file'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/blacklist.rb:15:in `load_default_file'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/content.rb:17:in `initialize'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/lib/twitter_ebooks/nlp.rb:76:in `new'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/lib/twitter_ebooks/nlp.rb:76:in `keywords'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/lib/twitter_ebooks/model.rb:73:in `consume'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/lib/twitter_ebooks/model.rb:13:in `consume'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:58:in `block in consume'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:53:in `each'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:53:in `consume'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:194:in `command'
        from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:204:in `<top (required)>'
        from bin/ebooks:16:in `load'
        from bin/ebooks:16:in `<main>'

Because I like being weird, I'm running this in a dedicated user account on OpenBSD. ๐Ÿ˜„

ebooks start syntax error

whenever i do run ebooks start, i get the following:

C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/ebooks:354:in load': bots.rb:137: syntax error, unexpected keyword_end, expecting end-of-input (SyntaxError) from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/eb ooks:354:inload_bots'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/eb
ooks:285:in start' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/eb ooks:378:incommand'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/eb
ooks:389:in <top (required)>' from C:/Ruby200-x64/bin/ebooks:23:inload'
from C:/Ruby200-x64/bin/ebooks:23:in `/main/'

I'm guessing the syntax error is in the bots.rb file, but I'm not sure what it is since it's an exact copy of the ebooks_example bots.rb populated with the twitter keys, and username.

*main is in angle brackets

memory use very high

Seeing 4-5 gb ram+swap used whenever I invoke 'tweet' functionality. Granted the model I'm using is quite large but still: this limits how much ram the rest of my system has to work with a great deal.

Mentions aren't received and DM responses are being sent to self

I followed the basic instructions in setting this up but I'm finding a couple of issues.

Mentions aren't received at all and after a dm is received the bot replies to the sender, but then receives its own sent dm which it attempts to reply to until the API prevents it from doing so.

Has anyone come across this behaviour?

ebooks archive failing due to not understanding [:consumer_secret, :token_secret]

$ ebooks archive wolfoftheair corpus/wolfoftheair.json
Faraday::Builder is now Faraday::RackBuilder.
New archive for @wolfoftheair at corpus/wolfoftheair.json
/home/kyanha/lib/ruby/gems/2.1.0/gems/simple_oauth-0.3.0/lib/simple_oauth/header.rb:88:in attributes': SimpleOAuth: Found extra option keys not matching ATTRIBUTE_KEYS: (RuntimeError) [:consumer_secret, :token_secret] from /home/kyanha/lib/ruby/gems/2.1.0/gems/simple_oauth-0.3.0/lib/simple_oauth/header.rb:74:insigned_attributes'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/simple_oauth-0.3.0/lib/simple_oauth/header.rb:80:in normalized_attributes' from /home/kyanha/lib/ruby/gems/2.1.0/gems/simple_oauth-0.3.0/lib/simple_oauth/header.rb:62:into_s'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/client.rb:101:in block in request_setup' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:142:inblock in get'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:374:in block in run_request' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:388:inblock in build_request'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/request.rb:26:in block in create' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/request.rb:25:intap'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/request.rb:25:in create' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:384:inbuild_request'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:370:in run_request' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:140:inget'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/client.rb:108:in request' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/client.rb:66:inget'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/api/utils.rb:51:in objects_from_response' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/api/utils.rb:42:inobjects_from_response_with_user'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/api/timelines.rb:53:in user_timeline' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/lib/twitter_ebooks/archive.rb:73:inblock in sync'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/lib/twitter_ebooks/archive.rb:71:in loop' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/lib/twitter_ebooks/archive.rb:71:insync'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/bin/ebooks:115:in archive' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/bin/ebooks:207:incommand'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/bin/ebooks:217:in <top (required)>' from /home/kyanha/bin/ebooks:23:inload'
from /home/kyanha/bin/ebooks:23:in `

'

Did the jsonify function get removed?

I'm having trouble using 'ebooks consume-all' to consume my tweets.csv from the twitter backup download AND an updated file from running 'ebooks archive'.

I thought I'd try to jsonify tweets.csv but it appears the function is gone in 3.x?

still having the same problem from bug #24

original bug page: #24

I've upgraded to ruby 2.0 and am now running twitter_ebooks 3.0.4, but I still get this exact same error.

I've set my locale to utf-8 as suggested in that bug.

the output looks slightly different since I now have ruby 2.0 but it's basically the same as before:

/var/lib/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in encode': "\xCE" on US-ASCII (Encoding::InvalidByteSequenceError) from /var/lib/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:ininitialize'
from /var/lib/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in new' from /var/lib/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:inparse'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:53:in initialize' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:152:innew'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:152:in archive' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:324:incommand'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:341:in <top (required)>' from /usr/local/bin/ebooks:23:inload'
from /usr/local/bin/ebooks:23:in `

'

No live threads left. Deadlock? (fatal)

I'm getting the following error when I run: ebooks start

/var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:332:in `join': No live threads left. Deadlock? (fatal)
    from /var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:332:in `each'
    from /var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:332:in `start'
    from /var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:410:in `command'
    from /var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:422:in `<top (required)>'
    from /usr/local/bin/ebooks:23:in `load'
    from /usr/local/bin/ebooks:23:in `<main>'

I'm running:

ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
twitter_ebooks (3.1.2, 3.0.0)

Any ideas?

Unable to install via gem

On stock debian:

sudo gem install twitter_ebooks
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: twitter_ebooks requires twitter (~> 4.0); tweetstream requires twitter (~> 5.5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.