<commit_before># AsFoo

Convert Ruby String object to something.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'as_foo'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install as_foo

## Requirement

- `w3m`, `lynx`, `links` or `elinks` command to use `as_html`
- `redcarpet` gem to use `as_markdown`

## Usage

```
>> require 'as_foo'
=> true
>> md = <<MARKDOWN
# Sample
- a
- b
MARKDOWN
=> "# Sample\n- a\n- b\n"
>> md.as_markdown
=> "<h1>Sample</h1>\n\n<ul>\n<li>a</li>\n<li>b</li>\n</ul>\n"
>> md.as_markdown.as_html
Sample

  • a
  • b

=> nil
>>

>> require 'open-uri'
=> true
>> open("https://www.google.com/?hl=en").read.as_html
Search Images Maps Play YouTube Gmail Drive Calendar More >>
Web History | Settings | Sign in

                  x
                  [chrome-48] A faster way to browse the web
                              Install Google Chrome


Japan

           [                                                         ] Advanced
                                                                       searchLanguage
                       [Google Search][I'm Feeling Lucky]              tools

                        Google.co.jp offered in: 日本語
         Advertising ProgramsBusiness SolutionsAbout GoogleGoogle.com

                          (C) 2013 - Privacy & Terms

=> nil
```



## Contributing

1. Fork it ( https://github.com/tmaeda/as_foo/fork )
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 a new Pull Request<commit_msg>Add example of `.as_html(with: :lynx)`<commit_after># AsFoo

Convert Ruby String object to something.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'as_foo'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install as_foo

## Requirement

- `w3m`, `lynx`, `links` or `elinks` command to use `as_html` (default: :w3m)
- `redcarpet` gem to use `as_markdown`

## Usage

```
>> require 'as_foo'
=> true
>> md = <<MARKDOWN
# Sample
- a
- b
MARKDOWN
=> "# Sample\n- a\n- b\n"
>> md.as_markdown
=> "<h1>Sample</h1>\n\n<ul>\n<li>a</li>\n<li>b</li>\n</ul>\n"
>> md.as_markdown.as_html
Sample

  • a
  • b

=> nil
>>

>> require 'open-uri'
=> true
>> open("https://www.google.com/?hl=en").read.as_html
Search Images Maps Play YouTube Gmail Drive Calendar More >>
Web History | Settings | Sign in

                  x
                  [chrome-48] A faster way to browse the web
                              Install Google Chrome


Japan

           [                                                         ] Advanced
                                                                       searchLanguage
                       [Google Search][I'm Feeling Lucky]              tools

                        Google.co.jp offered in: 日本語
         Advertising ProgramsBusiness SolutionsAbout GoogleGoogle.com

                          (C) 2013 - Privacy & Terms

=> nil

>> open("https://www.google.com/?hl=en").read.as_html(with: :lynx)

   Search Images Maps Play YouTube Gmail Drive Calendar More ?
   Web History | Settings | Sign in


      [chrome-48.png] A faster way to browse the web
                   Install Google Chrome

   &#19982;&#35613;&#37326;&#26230;&#23376; &#29983;&#35477; 136
   &#21608;&#24180;


   _________________________________________________________
        Google Search I'm Feeling Lucky Advanced searchLanguage tools

   Google.co.jp offered in: &#26085;&#26412;&#35486;

   Advertising ProgramsBusiness SolutionsAbout GoogleGoogle.com

                          ? 2013 - Privacy & Terms
=> nil
```



## Contributing

1. Fork it ( https://github.com/tmaeda/as_foo/fork )
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 a new Pull Request
{'fraction_non_alphanumeric': 0.11978131212723658, 'fraction_numerical': 0.024353876739562623, 'mean_word_length': 2.0014914243102164, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 66, 'https://': 5, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5463450', 'n_tokens_mistral': 1323, 'n_tokens_neox': 1156, 'n_words': 372}