Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/glaszig/bildchen

Find the most likely favicon for a given URL
https://github.com/glaszig/bildchen

Last synced: 13 days ago
JSON representation

Find the most likely favicon for a given URL

Awesome Lists containing this project

README

        

# Bildchen

[![Build Status](https://github.com/glaszig/bildchen/actions/workflows/test.yml/badge.svg)](https://github.com/glaszig/bildchen/actions)

Ruby library which tries to find the most likely favicon for a given URL.
It does so via HTTP HEAD requests and traversing up the URI path.

## Installation

Add this line to your application's Gemfile:

gem 'bildchen', github: 'glaszig/bildchen'

And then execute:

$ bundle

## Usage

Cached:

Bildchen['http://www.example.com/path/to/somewhere']

Uncached:

bildchen = Bildchen::Resolver.new 'http://www.example.com/path/to/somewhere'
bildchen.resolve

### Configuration

HTTP timeouts default to 5 seconds and can be tuned as follows

Bildchen.timeout = 10

## 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