{"id":13648510,"url":"https://github.com/rust-cli/roff-rs","last_synced_at":"2025-05-16T02:08:56.525Z","repository":{"id":45127503,"uuid":"130122313","full_name":"rust-cli/roff-rs","owner":"rust-cli","description":"ROFF (man page format) generation library","archived":false,"fork":false,"pushed_at":"2025-05-07T12:47:09.000Z","size":210,"stargazers_count":63,"open_issues_count":3,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-08T23:05:16.471Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"docs.rs/roff","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-cli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","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":"2018-04-18T21:10:25.000Z","updated_at":"2025-05-05T06:43:07.000Z","dependencies_parsed_at":"2023-09-26T19:18:37.280Z","dependency_job_id":"3b0de1a9-9b5c-4521-8185-990a6493a44c","html_url":"https://github.com/rust-cli/roff-rs","commit_stats":{"total_commits":171,"total_committers":12,"mean_commits":14.25,"dds":0.2807017543859649,"last_synced_commit":"9ba7dc5d3d7ca0405faf40ee634e3597f4571592"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-cli%2Froff-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-cli%2Froff-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-cli%2Froff-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-cli%2Froff-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-cli","download_url":"https://codeload.github.com/rust-cli/roff-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453655,"owners_count":22073617,"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-08-02T01:04:19.017Z","updated_at":"2025-05-16T02:08:56.494Z","avatar_url":"https://github.com/rust-cli.png","language":"Rust","readme":"# roff-rs\n\n[![Documentation](https://img.shields.io/badge/docs-master-blue.svg)][Documentation]\n![License](https://img.shields.io/crates/l/roff.svg)\n[![crates.io](https://img.shields.io/crates/v/roff.svg)][Crates.io]\n\n[Crates.io]: https://crates.io/crates/roff\n[Documentation]: https://docs.rs/roff/\n\n[Roff](http://man7.org/linux/man-pages/man7/roff.7.html) generation library.\n\n## Examples\n\n```rust\nuse roff::{bold, italic, roman, Roff};\n\nfn main() {\n    let page = Roff::new()\n        .control(\"TH\", [\"CORRUPT\", \"1\"])\n        .control(\"SH\", [\"NAME\"])\n        .text([roman(\"corrupt - modify files by randomly changing bits\")])\n        .control(\"SH\", [\"SYNOPSIS\"])\n        .text([bold(\"corrupt\"), roman(\" [\"), bold(\"-n\"), roman(\" \"), italic(\"BITS\"), roman(\"] [\"),\n               bold(\"--bits\"), roman(\" \"), italic(\"BITS\"), roman(\"] \"), italic(\"FILE\"), roman(\"...\"),\n        ])\n        .control(\"SH\", [\"DESCRIPTION\"])\n        .text([bold(\"corrupt\"), roman(\" modifies files by toggling a randomly chosen bit.\")])\n        .control(\"SH\", [\"OPTIONS\"])\n        .control(\"TP\", [])\n        .text([bold(\"-n\"), roman(\", \"), bold(\"--bits\"), roman(\"=\"), italic(\"BITS\")])\n        .text([roman(\"Set the number of bits to modify. Default is one bit.\")])\n        .render();\n    print!(\"{}\", page);\n}\n```\n\nWhich outputs:\n```troff\n.ie \\n(.g .ds Aq \\(aq\n.el .ds Aq '\n.TH CORRUPT 1\n.SH NAME\ncorrupt \\- modify files by randomly changing bits\n.SH SYNOPSIS\n\\fBcorrupt\\fR [\\fB\\-n\\fR \\fIBITS\\fR] [\\fB\\-\\-bits\\fR \\fIBITS\\fR] \\fIFILE\\fR...\n.SH DESCRIPTION\n\\fBcorrupt\\fR modifies files by toggling a randomly chosen bit.\n.SH OPTIONS\n.TP\n\\fB\\-n\\fR, \\fB\\-\\-bits\\fR=\\fIBITS\\fR\nSet the number of bits to modify. Default is one bit.\n```\n\nWhich will be shown by the `man(1)` command as:\n\n```txt\nCORRUPT(1)                 General Commands Manual                CORRUPT(1)\n\nNAME\n       corrupt - modify files by randomly changing bits\n\nSYNOPSIS\n       corrupt [-n BITS] [--bits BITS] FILE...\n\nDESCRIPTION\n       corrupt modifies files by toggling a randomly chosen bit.\n\nOPTIONS\n       -n, --bits=BITS\n              Set the number of bits to modify. Default is one bit.\n\n                                                                  CORRUPT(1)\n```\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual-licensed as above, without any additional terms or\nconditions.\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-cli%2Froff-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-cli%2Froff-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-cli%2Froff-rs/lists"}