{"id":16489941,"url":"https://github.com/crowdagger/crowbook-text-processing","last_synced_at":"2026-03-03T22:31:17.728Z","repository":{"id":54360723,"uuid":"70178455","full_name":"crowdagger/crowbook-text-processing","owner":"crowdagger","description":"Some text processing functions written for Crowbook and moved in a separate library","archived":false,"fork":false,"pushed_at":"2023-08-03T00:01:01.000Z","size":149,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-17T18:45:08.499Z","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":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crowdagger.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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},"funding":{"github":"lise_henry"}},"created_at":"2016-10-06T17:50:34.000Z","updated_at":"2025-09-25T08:45:34.000Z","dependencies_parsed_at":"2024-03-09T01:48:23.041Z","dependency_job_id":null,"html_url":"https://github.com/crowdagger/crowbook-text-processing","commit_stats":null,"previous_names":["crowdagger/crowbook-text-processing","lise-henry/crowbook-text-processing"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/crowdagger/crowbook-text-processing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdagger%2Fcrowbook-text-processing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdagger%2Fcrowbook-text-processing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdagger%2Fcrowbook-text-processing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdagger%2Fcrowbook-text-processing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crowdagger","download_url":"https://codeload.github.com/crowdagger/crowbook-text-processing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdagger%2Fcrowbook-text-processing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30064286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-10-11T13:45:55.275Z","updated_at":"2026-03-03T22:31:17.703Z","avatar_url":"https://github.com/crowdagger.png","language":"Rust","funding_links":["https://github.com/sponsors/lise_henry"],"categories":[],"sub_categories":[],"readme":"[See the full library documentation on Docs.rs.](https://docs.rs/crowbook-text-processing)\n\nProvides some utilities functions for escaping text (to HTML or\nLaTeX) and formatting it according to typographic rules (smart\nquotes, ellipsis, french rules for non-breaking spaces).\n\nThese functions were originally written for\n[Crowbook](https://github.com/lise-henry/crowbook), but have\nbeen published on a separate crate and under a less restrictive\nlicense (MPL instead of LGPL) so they can be used in other projects.\n\n## Usage\n\nJust add this line in the `dependencies` section of your `Cargo.toml`\nfile:\n\n```toml\n[dependencies]\ncrowbook-text-processing = \"0.2\"\n```\n\n## Example\n\n```rust\nuse crowbook_text_processing::{FrenchFormatter, clean, escape};\n\nlet s = \" Some  string with  too much   whitespaces \u0026 around 1% \\\n         characters that might cause trouble to HTML or LaTeX.\";\n// Remove unnecessary whitespaces (but doesn't trim as it can have meaning)\nlet new_s = clean::whitespaces(s);\n// Escape forHTML\nprintln!(\"for HTML: {}\", escape::html(new_s.clone()));\n// Escape for LaTeX\nprintln!(\"for LaTeX: {}\", escape::tex(new_s));\n\n// Replace quotes with typographic quotation marks\nlet s = r#\"Some \"quoted string\" and 'another one'.\"#;\nlet new_s = clean::quotes(s);\nassert_eq!(\u0026new_s, \"Some “quoted string” and ‘another one’.\");\n\n// Replace three consecutive dots with ellipsis character\nlet s = clean::ellipsis(\"Foo...\");\nassert_eq!(\u0026s, \"Foo…\");\n\n// Format whitespaces according to french typographic rules, using\n// the appropriate non-breaking spaces where needed\nlet s = \" Une chaîne en français ! On voudrait un résultat \\\n         « typographiquement correct ».\";\nlet french = FrenchFormatter::new();\nprintln!(\"for text: {}\", french.format(s));\nprintln!(\"for LaTeX: {}\", escape::tex(french.format_tex(s)));\n```\n\n## License\n\nThis is free software, published under the [Mozilla Public License,\nversion 2.0](https://www.mozilla.org/en-US/MPL/2.0/).\n\n## ChangeLog\n\nSee the [ChangeLog file](ChangeLog.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdagger%2Fcrowbook-text-processing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrowdagger%2Fcrowbook-text-processing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdagger%2Fcrowbook-text-processing/lists"}