<commit_before>h1. ip-writer-rails

p. "<NAME>'s":http://kimasendorf.com/ "IP Writer":http://kimasendorf.com/ipwriter ported to Ruby for use in for Rails applcations. IP Writer reads the IP address of a visitor to a website and tweets it. By default it will tweet to the IP Writer twitter account, although you may configure it to tweet from any account you have access to.

h2. Installation

p. Include IPWriter in your Gemfile: @gem 'ip-writer-rails'@.

h2. Usage

p. Using IPWriter is simple. Just include the @ip_writer@ method anywhere in a controller.

<pre>
class HomeController < ApplicationController
  def index
    ip_writer
    ......
  end
end
</pre>

h3. Tweet from any account

p. You can tweet from any account by passing your Twitter consumer and OAuth keys to IPWriter.

<pre>
class HomeController < ApplicationController
  def index
    ip_writer(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)<commit_msg>tweaks<commit_after>h1. ip-writer-rails

p. This is "<NAME>'s":http://kimasendorf.com/ "IP Writer":http://kimasendorf.com/ipwriter ported to Ruby for use in for Rails applcations. IP Writer reads the IP address of a visitor to a website and tweets it. By default it will tweet to the IP Writer twitter account, although you may configure it to tweet from any account you have access to.

h2. Installation

p. Include IPWriter in your Gemfile: @gem 'ip-writer-rails'@

h2. Usage

p. Using IPWriter is simple. Just include the @ip_writer@ method anywhere in a controller.

<pre>
class HomeController < ApplicationController
  def index
    ip_writer
    ......
  end
end
</pre>

h3. Tweet from any account

p. You can tweet from any account by passing your Twitter consumer and OAuth keys to IPWriter.

<pre>
class HomeController < ApplicationController
  def index
    ip_writer(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
{'fraction_non_alphanumeric': 0.07279489904357067, 'fraction_numerical': 0.004250797024442083, 'mean_word_length': 4.03475935828877, 'pattern_counts': {'":': 4, '<': 15, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3165477', 'n_tokens_mistral': 592, 'n_tokens_neox': 568, 'n_words': 247}