{"id":20874986,"url":"https://github.com/servicestack/gistcafe-rust","last_synced_at":"2025-06-19T17:32:48.545Z","repository":{"id":57633755,"uuid":"333095813","full_name":"ServiceStack/gistcafe-rust","owner":"ServiceStack","description":"gist.cafe utils for Rust","archived":false,"fork":false,"pushed_at":"2021-01-28T19:06:42.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-09T22:31:37.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ServiceStack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-26T13:37:12.000Z","updated_at":"2021-01-28T19:06:44.000Z","dependencies_parsed_at":"2022-09-26T20:11:26.005Z","dependency_job_id":null,"html_url":"https://github.com/ServiceStack/gistcafe-rust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ServiceStack","download_url":"https://codeload.github.com/ServiceStack/gistcafe-rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243249011,"owners_count":20260768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T06:40:39.077Z","updated_at":"2025-03-12T16:16:02.046Z","avatar_url":"https://github.com/ServiceStack.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Useful utils for [gist.cafe](https://gist.cafe) Rust Apps.\n\n## Usage\n\nSimple Usage Example:\n\n```rust\nextern crate gistcafe;\nextern crate serde_json;\n\nuse std::*;\nuse serde_json::*;\nuse gistcafe::inspect::*;\n\n#[tokio::main]\nasync fn main() {\n    let org_name = \"rust-lang\";\n\n    let res = reqwest::Client::new()\n        .get(\u0026format!(\"https://api.github.com/orgs/{}/repos\", org_name))\n        .header(reqwest::header::USER_AGENT, \"gist.cafe\")\n        .send()\n        .await.unwrap();\n\n    let json: Vec\u003cMap\u003cString,Value\u003e\u003e = res.json().await.unwrap();\n    let mut org_repos: Vec\u003cMap\u003cString,Value\u003e\u003e = Vec::new();\n    for x in json.iter() {\n        org_repos.push(json!({\n            \"name\":        x[\"name\"],\n            \"description\": x[\"description\"],\n            \"lang\":        x[\"language\"],\n            \"watchers\":    x[\"watchers\"],\n            \"forks\":       x[\"forks\"],\n        }).as_object().unwrap().clone());\n    }\n    org_repos.sort_by(|a, b| b[\"watchers\"].as_i64().cmp(\u0026a[\"watchers\"].as_i64()));\n    \n    println!(\"Top 3 {} GitHub Repos:\", org_name);\n    print_dump(\u0026org_repos[1..=3]);\n\n    println!(\"\\nTop 10 {} GitHub Repos:\", org_name);\n    print_dump_table(\u0026org_repos[1..=10].iter().map(|x| json!({\n        \"name\":        x[\"name\"],\n        \"lang\":        x[\"lang\"],\n        \"watchers\":    x[\"watchers\"],\n        \"forks\":       x[\"forks\"],\n    }).as_object().unwrap().clone()).collect());\n\n    println!(\"\\nTop 10 {} GitHub Repos:\", org_name);\n    print_dump_table_columns(\u0026org_repos[1..=10].to_vec(), \n        vec![\"name\", \"lang\", \"watchers\", \"forks\"]);\n}\n```\n\nWhich outputs:\n\n```\nTop 3 rust-lang GitHub Repos:\n[\n  {\n    description: The Rust package manager,\n    forks: 1322,\n    lang: Rust,\n    name: cargo,\n    watchers: 6413\n  },\n  {\n    description: A bunch of lints to catch common mistakes and improve your Rust code,\n    forks: 755,\n    lang: Rust,\n    name: rust-clippy,\n    watchers: 5438\n  },\n  {\n    description: Learn Rust with examples (Live code editor included),\n    forks: 764,\n    lang: null,\n    name: rust-by-example,\n    watchers: 3770\n  }\n]\n\nTop 10 rust-lang GitHub Repos:\n+-----------------------------------------------------+\n| forks |     lang     |       name        | watchers |\n|-----------------------------------------------------|\n|  1322 ! Rust         ! cargo             !     6413 !\n|   755 ! Rust         ! rust-clippy       !     5438 !\n|   764 ! null         ! rust-by-example   !     3770 !\n|  1097 ! Shell        ! rfcs              !     3413 !\n|   224 ! Vim script   ! rust.vim          !     2433 !\n|   427 ! Rust         ! crates.io         !     1870 !\n|   264 ! Rust         ! regex             !     1756 !\n|   148 ! Rust         ! log               !      975 !\n|   569 ! Rust         ! libc              !      944 !\n|   262 ! Rust         ! git2-rs           !      794 !\n+-----------------------------------------------------+\n\nTop 10 rust-lang GitHub Repos:\n+-----------------------------------------------------+\n|       name        |     lang     | watchers | forks |\n|-----------------------------------------------------|\n| cargo             ! Rust         !     6413 !  1322 !\n| rust-clippy       ! Rust         !     5438 !   755 !\n| rust-by-example   ! null         !     3770 !   764 !\n| rfcs              ! Shell        !     3413 !  1097 !\n| rust.vim          ! Vim script   !     2433 !   224 !\n| crates.io         ! Rust         !     1870 !   427 !\n| regex             ! Rust         !     1756 !   264 !\n| log               ! Rust         !      975 !   148 !\n| libc              ! Rust         !      944 !   569 !\n| git2-rs           ! Rust         !      794 !   262 !\n+-----------------------------------------------------+\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ServiceStack/gistcafe-rust.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicestack%2Fgistcafe-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fservicestack%2Fgistcafe-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicestack%2Fgistcafe-rust/lists"}