{"id":15405961,"url":"https://github.com/meh/rust-terminfo","last_synced_at":"2025-04-04T21:06:11.863Z","repository":{"id":54984509,"uuid":"77328586","full_name":"meh/rust-terminfo","owner":"meh","description":"Terminal information for Rust.","archived":false,"fork":false,"pushed_at":"2024-05-08T13:44:38.000Z","size":165,"stargazers_count":72,"open_issues_count":8,"forks_count":18,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-28T20:06:32.795Z","etag":null,"topics":["ncurses","rust","terminfo"],"latest_commit_sha":null,"homepage":null,"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/meh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-25T14:06:11.000Z","updated_at":"2025-03-11T14:07:36.000Z","dependencies_parsed_at":"2024-01-27T16:23:55.535Z","dependency_job_id":"4ee10a7b-4e0a-43a2-bf60-e5cb8de2d5c3","html_url":"https://github.com/meh/rust-terminfo","commit_stats":{"total_commits":105,"total_committers":12,"mean_commits":8.75,"dds":"0.22857142857142854","last_synced_commit":"e2e4f736e82d474beebfb050440a1ae70d6de863"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meh%2Frust-terminfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meh%2Frust-terminfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meh%2Frust-terminfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meh%2Frust-terminfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meh","download_url":"https://codeload.github.com/meh/rust-terminfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249524,"owners_count":20908212,"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":["ncurses","rust","terminfo"],"created_at":"2024-10-01T16:19:06.106Z","updated_at":"2025-04-04T21:06:11.846Z","avatar_url":"https://github.com/meh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"terminfo\n========\n[![Crates.io](https://img.shields.io/crates/v/terminfo.svg)](https://crates.io/crates/terminfo) [![Crates.io](https://img.shields.io/crates/d/terminfo.svg)](https://crates.io/crates/terminfo) ![WTFPL](http://img.shields.io/badge/license-WTFPL-blue.svg) [![Build Status](https://github.com/meh/rust-terminfo/actions/workflows/rust.yml/badge.svg)](https://github.com/meh/rust-terminfo/actions/workflows/rust.yml)\n\nTerminal capabilities with type-safe getters.\n\n[Documentation](https://docs.rs/terminfo/latest/terminfo/)\n\nExample\n-------\n\n```rust\nuse std::io;\nuse terminfo::{capability as cap, Database};\n\nfn main() {\n\tlet info = Database::from_env().unwrap();\n\n\tif let Some(cap::MaxColors(n)) = info.get::\u003ccap::MaxColors\u003e() {\n\t\tprintln!(\"The terminal supports {} colors.\", n);\n\t} else {\n\t\tprintln!(\"The terminal does not support colors, what year is this?\");\n\t}\n\n\tif let Some(flash) = info.get::\u003ccap::FlashScreen\u003e() {\n\t\tflash.expand().to(io::stdout()).unwrap();\n\t} else {\n\t\tprintln!(\"FLASH GORDON!\");\n\t}\n\n\tinfo.get::\u003ccap::SetAForeground\u003e().unwrap().expand().color(2).to(io::stdout()).unwrap();\n\tinfo.get::\u003ccap::SetABackground\u003e().unwrap().expand().color(4).to(io::stdout()).unwrap();\n\tprintln!(\"SUP\");\n\tinfo.get::\u003ccap::ExitAttributeMode\u003e().unwrap().expand().to(io::stdout()).unwrap();\n}\n```\n\nPackaging and Distributing\n--------------------------\nFor all terminals but windows consoles, this library depends on a non-hashed\n(for now) terminfo database being present. For example, on Debian derivitives,\nyou should depend on ncurses-term; on Arch Linux, you depend on ncurses; and on\nMinGW, you should depend on mingw32-terminfo.\n\nUnfortunately, if you're using a non-windows console on Windows (e.g. MinGW,\nCygwin, Git Bash), you'll need to set the TERMINFO environment variable to\npoint to the directory containing the terminfo database.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeh%2Frust-terminfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeh%2Frust-terminfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeh%2Frust-terminfo/lists"}