{"id":30026935,"url":"https://github.com/dryrust/tldr.rs","last_synced_at":"2025-09-17T11:08:45.131Z","repository":{"id":308136653,"uuid":"1031804069","full_name":"dryrust/tldr.rs","owner":"dryrust","description":"Rust abstractions for TL;DR summarization using the five Ws: who? what? when? where? why?","archived":false,"fork":false,"pushed_at":"2025-08-06T06:56:14.000Z","size":35,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-11T15:30:17.179Z","etag":null,"topics":["rust","rust-crate","tldr"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/tldr-traits","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dryrust.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-04T11:02:34.000Z","updated_at":"2025-08-06T07:07:21.000Z","dependencies_parsed_at":"2025-08-04T13:16:37.258Z","dependency_job_id":"bd8ad23a-2807-4bcc-8b55-875a0433c364","html_url":"https://github.com/dryrust/tldr.rs","commit_stats":null,"previous_names":["dryrust/tldr.rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dryrust/tldr.rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryrust%2Ftldr.rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryrust%2Ftldr.rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryrust%2Ftldr.rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryrust%2Ftldr.rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dryrust","download_url":"https://codeload.github.com/dryrust/tldr.rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryrust%2Ftldr.rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275583378,"owners_count":25490651,"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","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["rust","rust-crate","tldr"],"created_at":"2025-08-06T11:56:00.357Z","updated_at":"2025-09-17T11:08:45.097Z","avatar_url":"https://github.com/dryrust.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TL;DR.rs\n\n[![License](https://img.shields.io/badge/license-Public%20Domain-blue.svg)](https://unlicense.org)\n[![Compatibility](https://img.shields.io/badge/rust-1.85%2B-blue)](https://blog.rust-lang.org/2025/02/20/Rust-1.85.0/)\n[![Package](https://img.shields.io/crates/v/tldr-traits)](https://crates.io/crates/tldr-traits)\n[![Documentation](https://docs.rs/tldr-traits/badge.svg)](https://docs.rs/tldr-traits)\n\n[Rust] abstractions for [TL;DR] summarization using the [five Ws]:\n*who?* *what?* *when?* *where?* *why?*\n\n## ✨ Features\n\n- Provides the [`Tldr`](#tldr) trait for generating TL;DR summaries.\n- Provides the [`ToTldr`](#totldr) trait for converting objects into TL;DR\n  summaries.\n- Supports multilingual TL;DR generation while defaulting to English.\n- Zero required dependencies, only optional integrations with [Serde] \u0026 [Bon].\n- Adheres to the Rust API Guidelines in its [naming conventions].\n- 100% free and unencumbered public domain software.\n\n## 🛠️ Prerequisites\n\n- [Rust] 1.85+ (2024 edition)\n\n## ⬇️ Installation\n\n### Installation via Cargo\n\n```bash\ncargo add tldr-traits --rename tldr\n```\n\n### Installation in `Cargo.toml` (with all features enabled)\n\n```toml\n[dependencies]\ntldr = { version = \"0\", package = \"tldr-traits\" }\n```\n\n### Installation in `Cargo.toml` (with only specific features enabled)\n\n```toml\n[dependencies]\ntldr = { version = \"0\", package = \"tldr-traits\", default-features = false, features = [\"serde\"] }\n```\n\n## 👉 Examples\n\n### Importing the Library\n\n```rust,ignore\nuse tldr::{Tldr, TldrContext, TldrLanguage, TldrResult, TldrSummary, ToTldr};\n```\n\n### Implementing the Trait\n\n```rust,ignore\nstruct Rectangle {\n    width: u32,\n    height: u32,\n}\n\nimpl Tldr\u003cString\u003e for Rectangle {\n    type Error = Box\u003cdyn Error\u003e;\n\n    fn what(\u0026self, _ctx: \u0026TldrContext) -\u003e TldrResult\u003cString\u003e {\n        Ok(Some(format!(\"A rectangle with a width of {} and a height of {}.\", self.width, self.height)))\n    }\n}\n```\n\n## 📚 Reference\n\n- [`Tldr`](#tldr)\n- [`TldrContext`](#tldrcontext)\n- [`TldrLanguage`](#tldrlanguage)\n- [`TldrResult`](#tldrresult)\n- [`TldrSummary`](#tldrsummary)\n- [`ToTldr`](#totldr)\n\n### [`Tldr`]\n\n```rust,ignore\npub trait Tldr\u003cT = String\u003e {\n    fn who(\u0026self, ctx: \u0026TldrContext) -\u003e TldrResult\u003cT\u003e;\n    fn what(\u0026self, ctx: \u0026TldrContext) -\u003e TldrResult\u003cT\u003e;\n    fn when(\u0026self, ctx: \u0026TldrContext) -\u003e TldrResult\u003cT\u003e;\n    fn where(\u0026self, ctx: \u0026TldrContext) -\u003e TldrResult\u003cT\u003e;\n    fn why(\u0026self, ctx: \u0026TldrContext) -\u003e TldrResult\u003cT\u003e;\n    fn whence(\u0026self, ctx: \u0026TldrContext) -\u003e TldrResult\u003cT\u003e;\n    fn how(\u0026self, ctx: \u0026TldrContext) -\u003e TldrResult\u003cT\u003e;\n}\n```\n\n### [`TldrContext`]\n\n```rust,ignore\npub struct TldrContext {\n    pub language: TldrLanguage,\n}\n```\n\n### [`TldrLanguage`]\n\n```rust,ignore\npub enum TldrLanguage {\n    #[default]\n    English,\n    // ...\n    Other(String),\n}\n```\n\n### [`TldrResult`]\n\n```rust,ignore\npub type TldrResult\u003cT = String, E = Box\u003cdyn Error\u003e\u003e =\n    Result\u003cOption\u003cT\u003e, E\u003e;\n```\n\n### [`TldrSummary`]\n\n```rust,ignore\npub struct TldrSummary\u003cT = String\u003e {\n    pub who: Option\u003cT\u003e,\n    pub what: Option\u003cT\u003e,\n    pub when: Option\u003cT\u003e,\n    pub where: Option\u003cT\u003e,\n    pub why: Option\u003cT\u003e,\n    pub whence: Option\u003cT\u003e,\n    pub how: Option\u003cT\u003e,\n}\n```\n\n### [`ToTldr`]\n\n```rust,ignore\npub trait ToTldr\u003cT = String\u003e {\n    fn to_tldr(\u0026self) -\u003e Box\u003cdyn Tldr\u003cT\u003e\u003e;\n}\n```\n\n## 👨‍💻 Development\n\n```bash\ngit clone https://github.com/dryrust/tldr.rs.git\n```\n\n---\n\n[![Share on X](https://img.shields.io/badge/share%20on-x-03A9F4?logo=x)](https://x.com/intent/post?url=https://github.com/dryrust/tldr.rs\u0026text=TL;DR.rs)\n[![Share on Reddit](https://img.shields.io/badge/share%20on-reddit-red?logo=reddit)](https://reddit.com/submit?url=https://github.com/dryrust/tldr.rs\u0026title=TL;DR.rs)\n[![Share on Hacker News](https://img.shields.io/badge/share%20on-hn-orange?logo=ycombinator)](https://news.ycombinator.com/submitlink?u=https://github.com/dryrust/tldr.rs\u0026t=TL;DR.rs)\n[![Share on Facebook](https://img.shields.io/badge/share%20on-fb-1976D2?logo=facebook)](https://www.facebook.com/sharer/sharer.php?u=https://github.com/dryrust/tldr.rs)\n[![Share on LinkedIn](https://img.shields.io/badge/share%20on-linkedin-3949AB?logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/dryrust/tldr.rs)\n\n[Bon]: https://crates.io/crates/bon\n[Rust]: https://rust-lang.org\n[Serde]: https://crates.io/crates/serde\n[TL;DR]: https://en.wikipedia.org/wiki/TL;DR\n[five Ws]: https://en.wikipedia.org/wiki/Five_Ws\n[naming conventions]: https://rust-lang.github.io/api-guidelines/naming.html\n\n[`Tldr`]: https://docs.rs/tldr-traits/latest/tldr_traits/trait.Tldr.html\n[`TldrContext`]: https://docs.rs/tldr-traits/latest/tldr_traits/struct.TldrContext.html\n[`TldrLanguage`]: https://docs.rs/tldr-traits/latest/tldr_traits/enum.TldrLanguage.html\n[`TldrResult`]: https://docs.rs/tldr-traits/latest/tldr_traits/type.TldrResult.html\n[`TldrSummary`]: https://docs.rs/tldr-traits/latest/tldr_traits/struct.TldrSummary.html\n[`ToTldr`]: https://docs.rs/tldr-traits/latest/tldr_traits/trait.ToTldr.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdryrust%2Ftldr.rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdryrust%2Ftldr.rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdryrust%2Ftldr.rs/lists"}