{"id":24189658,"url":"https://github.com/ztgx/text2html","last_synced_at":"2025-10-04T08:44:26.846Z","repository":{"id":57669607,"uuid":"201438935","full_name":"zTgx/text2html","owner":"zTgx","description":"A library for which render text to html in Rust","archived":false,"fork":false,"pushed_at":"2019-08-28T04:00:36.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T21:02:55.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zTgx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-09T09:43:21.000Z","updated_at":"2025-01-17T13:43:20.000Z","dependencies_parsed_at":"2022-09-26T20:40:59.697Z","dependency_job_id":null,"html_url":"https://github.com/zTgx/text2html","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zTgx/text2html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Ftext2html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Ftext2html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Ftext2html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Ftext2html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zTgx","download_url":"https://codeload.github.com/zTgx/text2html/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Ftext2html/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278289467,"owners_count":25962353,"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-10-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2025-01-13T14:30:17.885Z","updated_at":"2025-10-04T08:44:26.831Z","avatar_url":"https://github.com/zTgx.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [text2html](https://github.com/zTgx/text2html) [![Build Status](https://travis-ci.org/zTgx/text2html.svg?branch=master)](https://travis-ci.org/zTgx/text2html) [![crate](https://img.shields.io/crates/v/text2html.svg)](https://crates.io/crates/text2html) \n\n#### an exprimental project.\nWIP  \nA library render text to html in Rust.\n\n## Usage\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntext2html = \"0.0.1\"\n```\n\n---\nExample:\n```rust\npub struct Content \u003c'b\u003e {\n    pub c: \u0026'b String,\n}\nimpl \u003c'b\u003e Content \u003c'b\u003e {\n    pub fn new(s: \u0026'b String) -\u003e Self {\n        Content {\n            c: s,\n        }\n    }\n}\nimpl \u003c'b\u003e Text for Content \u003c'b\u003e {\n    fn data_source(\u0026mut self) -\u003e String {\n        self.c.to_owned()\n    }\n}\n\npub struct TextBuilder \u003c'a\u003e {\n    pub sc: \u0026'a String,\n}\nimpl \u003c'a\u003e TextBuilder \u003c'a\u003e {\n    pub fn new(s: \u0026'a String) -\u003e Self {\n        TextBuilder {\n            sc: s,\n        }\n    }\n}\nimpl \u003c'a\u003e TextBuilder \u003c'a\u003e {\n    pub fn build(\u0026mut self) -\u003e Box\u003cdyn Text + 'a\u003e {\n        Box::new( Content::new(\u0026self.sc) )\n    }\n}\n\nfn main() {\n    let text = \"Hello world.\".to_string();\n    let mut builder = TextBuilder::new( \u0026text ).build();\n    HtmlRender::new().render(\u0026mut builder);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztgx%2Ftext2html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fztgx%2Ftext2html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztgx%2Ftext2html/lists"}