{"id":21667655,"url":"https://github.com/scpwiki/wikidot-normalize","last_synced_at":"2025-04-12T01:32:44.149Z","repository":{"id":40396563,"uuid":"211752584","full_name":"scpwiki/wikidot-normalize","owner":"scpwiki","description":"Simple library to provide Wikidot-compatible string normalization.","archived":false,"fork":false,"pushed_at":"2023-09-29T21:38:40.000Z","size":76,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-25T21:13:36.244Z","etag":null,"topics":["library","normalize","nuscp","rust","scp-foundation","wikidot"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scpwiki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-09-30T01:36:39.000Z","updated_at":"2025-02-01T14:51:16.000Z","dependencies_parsed_at":"2022-08-09T19:11:00.878Z","dependency_job_id":"685b327f-7f0f-4dd2-994c-8e411fea60d4","html_url":"https://github.com/scpwiki/wikidot-normalize","commit_stats":{"total_commits":145,"total_committers":2,"mean_commits":72.5,"dds":0.06206896551724139,"last_synced_commit":"8e2937a2deec76f663cab214740e9719ee557fa1"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scpwiki%2Fwikidot-normalize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scpwiki%2Fwikidot-normalize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scpwiki%2Fwikidot-normalize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scpwiki%2Fwikidot-normalize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scpwiki","download_url":"https://codeload.github.com/scpwiki/wikidot-normalize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504285,"owners_count":21115140,"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":["library","normalize","nuscp","rust","scp-foundation","wikidot"],"created_at":"2024-11-25T11:41:01.362Z","updated_at":"2025-04-12T01:32:44.120Z","avatar_url":"https://github.com/scpwiki.png","language":"Rust","readme":"## wikidot-normalize\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/scpwiki/wikidot-normalize/actions?query=workflow%3A%22Rust+CI%22\"\u003e\n    \u003cimg src=\"https://github.com/scpwiki/wikidot-normalize/workflows/Rust%20CI/badge.svg\"\n         alt=\"Rust CI badge\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://docs.rs/wikidot-normalize\"\u003e\n    \u003cimg src=\"https://docs.rs/wikidot-normalize/badge.svg\"\n         alt=\"docs.rs link\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nSimple library to provide Wikidot-compatible string normalization. It is a Rust port of the functionality in [`WDStringUtils::toUnixName`](https://github.com/scpwiki/wikijump/blob/legacy-php/web/php/Utils/WDStringUtils.php).\n\nWikidot normal form is used in the site's page names. Essentially it ensures the following:\n\n* All ASCII is lowercase.\n* All characters outside of `:`, `a-z`, `0-9`, or `-` are replaced with dashes.\n* Underscores are only permitted as the first character.\n* Any leading or trailing dashes are removed.\n* Any set of multiple dashes are replaced with a single dash.\n* Any set of multiple colons are replaced with a single colon.\n\n**Examples:**\n\n* `\"Big Cheese Horace\"` **-\u003e** `\"big-cheese-horace\"`\n* `\"bottom--Text\"` **-\u003e** `\"bottom-text\"`\n* `\"Tufto's Proposal\"` **-\u003e** `\"tufto-s-proposal\"`\n* `\"-test-\"` **-\u003e** `\"test\"`\n\nThis library is getting close to finalization with a `v1.0.0` release.\n\nAvailable under the terms of the MIT License. See [LICENSE.md](LICENSE).\n\n### Compilation\nThis library targets the latest stable Rust. At time of writing, that is 1.68.2\n\n```sh\n$ cargo build --release\n```\n\n### Testing\n```sh\n$ cargo test\n```\n\nAdd `-- --nocapture` to the end if you want to see test output.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscpwiki%2Fwikidot-normalize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscpwiki%2Fwikidot-normalize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscpwiki%2Fwikidot-normalize/lists"}