From a6cb32182298ee44a8dbfcc319f145fbaade19e3 Mon Sep 17 00:00:00 2001 From: Sam Denty Date: Tue, 3 Jan 2023 17:49:19 +0000 Subject: [PATCH] update README --- README.md | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index f90d354..57aced6 100644 --- a/README.md +++ b/README.md @@ -18,15 +18,19 @@ An efficient website icon scraper for rust or command line usage. First run `cargo install site_icons`, then: -```bash -site-icons https://github.com -# https://github.githubassets.com/favicons/favicon.svg site_favicon svg -# https://github.githubassets.com/app-icon-512.png app_icon png 512x512 -# https://github.githubassets.com/apple-touch-icon-180x180.png app_icon png 180x180 +
+site-icons https://github.com + +``` +https://github.githubassets.com/favicons/favicon.svg site_favicon svg +https://github.githubassets.com/app-icon-512.png app_icon png 512x512 +https://github.githubassets.com/apple-touch-icon-180x180.png app_icon png 180x180 ``` -
-View JSON output
site-icons https://reactjs.org --json
+
+ +
+site-icons https://reactjs.org --json ```json [ @@ -63,21 +67,6 @@ site-icons https://github.com
-### 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) -} -``` - ### Sources - HTML favicon tag (or looking for default `/favicon.svg` / `/favicon.ico`)