update README
This commit is contained in:
parent
2c8bba52fe
commit
1ecbd89124
1 changed files with 15 additions and 0 deletions
15
README.md
15
README.md
|
@ -14,6 +14,21 @@ An efficient website icon scraper for rust or command line usage.
|
||||||
- Works with inline-data URIs (and automatically converts `<svg>` to them)
|
- Works with inline-data URIs (and automatically converts `<svg>` to them)
|
||||||
- Supports WASM (and cloudflare workers)
|
- Supports WASM (and cloudflare workers)
|
||||||
|
|
||||||
|
### Rust usage
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use site_icons::SiteIcons;
|
||||||
|
|
||||||
|
let mut icons = SiteIcons::new();
|
||||||
|
// scrape the icons from a url
|
||||||
|
let entries = icons.load_website("https://github.com", false).await?;
|
||||||
|
|
||||||
|
// entries are sorted from highest to lowest resolution
|
||||||
|
for icon in entries {
|
||||||
|
println!("{:?}", icon)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### Command line usage
|
### Command line usage
|
||||||
|
|
||||||
First install the binary:
|
First install the binary:
|
||||||
|
|
Reference in a new issue