Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ikeikeikeike/exfavicon
Elixir library for discovering favicons
https://github.com/ikeikeikeike/exfavicon
Last synced: about 2 months ago
JSON representation
Elixir library for discovering favicons
- Host: GitHub
- URL: https://github.com/ikeikeikeike/exfavicon
- Owner: ikeikeikeike
- License: mit
- Created: 2015-12-06T13:38:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-09T13:38:05.000Z (almost 9 years ago)
- Last Synced: 2024-11-01T08:33:00.636Z (2 months ago)
- Language: Elixir
- Homepage: https://github.com/ikeikeikeike/exfavicon
- Size: 9.77 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - An Elixir library for discovering favicons. (Images)
- fucking-awesome-elixir - exfavicon - An Elixir library for discovering favicons. (Images)
- awesome-elixir - exfavicon - An Elixir library for discovering favicons. (Images)
README
# Exfavicon
[![Build Status](http://img.shields.io/travis/ikeikeikeike/exfavicon.svg?style=flat-square)](http://travis-ci.org/ikeikeikeike/exfavicon)
[![Hex version](https://img.shields.io/hexpm/v/exfavicon.svg "Hex version")](https://hex.pm/packages/exfavicon)
[![Hex downloads](https://img.shields.io/hexpm/dt/exfavicon.svg "Hex downloads")](https://hex.pm/packages/exfavicon)A exfavicon to detect a site's favicon.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:
1. Add exfavicon to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:exfavicon, "~> 0.3"}]
end
```2. Ensure exfavicon is started before your application:
```elixir
def application do
[applications: [:exfavicon]]
end
```## Usage
```elixir
# Find http://elixir-lang.org
Exfavicon.find("http://elixir-lang.org") # "http://elixir-lang.org/favicon.ico"# Find http://twitter.com
Exfavicon.find("http://twitter.com") # "http://abs.twimg.com/favicons/favicon.ico"# Find http://facebook.com
Exfavicon.find("http://facebook.com") # "https://static.xx.fbcdn.net/rsrc.php/yV/r/hzMapiNYYpW.ico"# Find http://youtube.com
Exfavicon.find("http://youtube.com") # "https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico"# Find https://www.google.com
Exfavicon.find("http://google.com/") # "https://www.google.co.jp/images/branding/product/ico/googleg_lodp.ico"```
[API Reference](http://hexdocs.pm/exfavicon/0.3.1/api-reference.html).