{"id":13937101,"url":"https://github.com/mozilla/unicode-slugify","last_synced_at":"2025-05-15T18:07:09.085Z","repository":{"id":1419137,"uuid":"1523364","full_name":"mozilla/unicode-slugify","owner":"mozilla","description":"A slugifier that works in unicode","archived":false,"fork":false,"pushed_at":"2024-01-27T19:38:22.000Z","size":29,"stargazers_count":321,"open_issues_count":11,"forks_count":52,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-08T19:25:51.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2011-03-24T23:08:09.000Z","updated_at":"2025-04-10T15:46:31.000Z","dependencies_parsed_at":"2024-04-18T11:27:55.408Z","dependency_job_id":"ba5df224-aef8-4a01-82e2-16a7cd9c2fcb","html_url":"https://github.com/mozilla/unicode-slugify","commit_stats":{"total_commits":31,"total_committers":14,"mean_commits":"2.2142857142857144","dds":0.8387096774193549,"last_synced_commit":"74d175dd4c9d21b1586842a3909118c7ec58f4ce"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Funicode-slugify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Funicode-slugify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Funicode-slugify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Funicode-slugify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla","download_url":"https://codeload.github.com/mozilla/unicode-slugify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253878442,"owners_count":21977804,"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-07T23:03:17.716Z","updated_at":"2025-05-15T18:07:09.067Z","avatar_url":"https://github.com/mozilla.png","language":"Python","readme":"# Unicode Slugify\n\nUnicode Slugify is a slugifier that generates unicode slugs.  It was originally\nused in the Firefox Add-ons web site to generate slugs for add-ons and add-on\ncollections. Many of these add-ons and collections had unicode characters and\nrequired more than simple transliteration.\n\n## Usage\n\n```python\n\nfrom slugify import slugify, SLUG_OK\n\n# Default usage : lower, spaces replaced with \"-\", only alphanum and \"-_~\" chars, keeps unicode\nslugify(u'Bän...g (bang)')\n# u'bäng-bang'\n\n# Keep capital letters and spaces\nslugify(u'Bän...g (bang)', lower=False, spaces=True)\n# u'Bäng bang'\n\n# Replace non ascii chars with their \"best\" representation\nslugify(u'北京 (capital of China)', only_ascii=True)\n# u'bei-jing-capital-of-china'\n\n# Allow some extra chars\nslugify(u'北京 (capital of China)', ok=SLUG_OK+'()', only_ascii=True)\n# u'bei-jing-(capital-of-china)'\n\n# \"snake_case\" example\ndef snake_case(s):\n    # As \"-\" is not in allowed Chars, first one (`_`) is used for space replacement\n    return slugify(s, ok='_', only_ascii=True)\nsnake_case(u'北京 (capital of china)')\n# u'bei_jing_capital_of_china'\n\n# \"CamelCase\" example\ndef camel_case(s):\n    return slugify(s.title(), ok='', only_ascii=True, lower=False)\ncamel_case(u'北京 (capital of china)')\n# u'BeiJingCapitalOfChina'\n```\n\n## Thanks\n\nTomaz Solc, unidecode, https://pypi.python.org/pypi/Unidecode\n","funding_links":[],"categories":["Text Processing","资源列表","文本处理","Python","Text Processing [🔝](#readme)","Awesome Python"],"sub_categories":["文本处理","Text Processing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Funicode-slugify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla%2Funicode-slugify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Funicode-slugify/lists"}