<commit_before># HnScraper

A gem for logging in and posting to Hacker News

## Installation

Add this line to your application's Gemfile:

    gem 'hn_scraper'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install hn_scraper

## Usage

~~~Ruby
cookie = HNScraper.get_login_cookie("username", "password")
puts cookie
if HNScraper.valid_hn_cookie?(cookie)
  url = "https://github.com/hstove/hn-scraper"
  title = "A Ruby Gem for Posting to Hacker News"
  HNScraper.post_to_hn("username", "password", title, url)
  link = HNScraper.newest_link
  puts "Posted: #{link}"
end
~~~

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request<commit_msg>Add instructions for ask HN<commit_after># HnScraper

A gem for logging in and posting to Hacker News

## Installation

Add this line to your application's Gemfile:

    gem 'hn_scraper'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install hn_scraper

## Usage

~~~Ruby
cookie = HNScraper.get_login_cookie("username", "password")
puts cookie
if HNScraper.valid_hn_cookie?(cookie)
  url = "https://github.com/hstove/hn-scraper"
  title = "A Ruby Gem for Posting to Hacker News"
  HNScraper.post_to_hn("username", "password", title, url)
  # HNScraper.post_to_hn "username", "password",url, 'just thought I'd post this'
  link = HNScraper.newest_link
  puts "Posted: #{link}"
end
~~~

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
{'fraction_non_alphanumeric': 0.11012235817575083, 'fraction_numerical': 0.0055617352614015575, 'mean_word_length': 4.184438040345821, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4949915', 'n_tokens_mistral': 645, 'n_tokens_neox': 609, 'n_words': 213}