<commit_before>= iconoclast

Description goes here.

== Note on Patches/Pull Requests
 
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2009 <NAME>. See LICENSE for details.
<commit_msg>Wrote README<commit_after># iconoclast

Finds favorites icons for web pages on the world wide internets by checking the HTML head or the standard favicon location. Then, do with them what you will.

### Usage

To get the favicon for a page, do:

`favicon = Iconoclast.extract('www.website.com')`

This will go and do a bunch of GETs (two or three, actually) on the url given. If you've already got the content and want to skip one of the GETs, you can pass the content in as the second argument.

`content = get_some_content('www.website.com')
favicon = Iconoclast.extract('www.website.com', content)`

`Iconoclast.extract` returns an `Iconoclast::Favicon` instance, from which you can get the URL, content type, size, or access the binary image data. By calling `valid?`, you can check if the favicon is valid based on whatever my standards were when I wrote this (basically, whether or not it's actually an image).

You can save the image to a tempfile using `favicon.save`, or more usefully, to a file at `favicon.save('path/to/file')`. Fun times had by all.

## Copyright

Copyright (c) 2009 <NAME>. See LICENSE for details.
{'fraction_non_alphanumeric': 0.07519242155121374, 'fraction_numerical': 0.004736530491415038, 'mean_word_length': 4.2, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, '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': '1404239', 'n_tokens_mistral': 498, 'n_tokens_neox': 468, 'n_words': 259}