From 1ecbd89124497655ad6ea49a245b61a6bec92ce0 Mon Sep 17 00:00:00 2001 From: Sam Denty Date: Tue, 3 Jan 2023 18:33:35 +0000 Subject: [PATCH] update README --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 30edaf9..ba699df 100644 --- a/README.md +++ b/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 `` to them) - 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 First install the binary: