Crates.io | repo_icons |
lib.rs | repo_icons |
version | 0.3.3 |
source | src |
created_at | 2021-02-01 12:33:11.191579 |
updated_at | 2022-12-24 18:21:18.820652 |
description | Get icons for any github repo |
homepage | https://github.com/samdenty/github-icons/tree/master/repo_icons |
repository | https://github.com/samdenty/github-icons/tree/master/repo_icons |
max_upload_size | |
id | 349242 |
size | 2,126,078 |
An API / Rust Library / CLI to get icons for any GitHub repo. Try it out
You can test it out locally, by downloading & running the CLI:
cargo install repo_icons
repo-icons facebook/react
# data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xMS41IC0xMC4yMzE3NCAyMyAyMC40NjM0OCI+CiAgPHRpdGxlPlJlYWN0IExvZ288L3RpdGxlPgogIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIyLjA1IiBmaWxsPSIjNjFkYWZiIi8+CiAgPGcgc3Ryb2tlPSIjNjFkYWZiIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIi8+CiAgICA8ZWxsaXBzZSByeD0iMTEiIHJ5PSI0LjIiIHRyYW5zZm9ybT0icm90YXRlKDYwKSIvPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIiB0cmFuc2Zvcm09InJvdGF0ZSgxMjApIi8+CiAgPC9nPgo8L3N2Zz4K site_logo svg
# https://reactjs.org/icons/icon-512x512.png?v=f4d46f030265b4c48a05c999b8d93791 app_icon png 512x512
# https://reactjs.org/icons/icon-384x384.png?v=f4d46f030265b4c48a05c999b8d93791 app_icon png 384x384
use repo_icons::RepoIcons;
let icons = RepoIcons::load("facebook", "react").await?;
for icon in icons {
println("{:?}", icon)
}
Clone this repo locally, and then:
cd api
wrangler publish
Install cargo make and then:
# to run cli
cargo make run facebook/react
# or to run the API devserver
cd api
cargo make run