{"id":21395973,"url":"https://github.com/khalidelboray/raku-text-slugify","last_synced_at":"2025-07-09T12:46:31.813Z","repository":{"id":115625825,"uuid":"267594139","full_name":"khalidelboray/raku-text-slugify","owner":"khalidelboray","description":"A module to slugify strings.","archived":false,"fork":false,"pushed_at":"2020-05-29T05:47:38.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-15T01:52:38.696Z","etag":null,"topics":["raku","raku-module","slugify","text"],"latest_commit_sha":null,"homepage":null,"language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khalidelboray.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2020-05-28T13:14:19.000Z","updated_at":"2020-10-25T02:31:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"8426deee-83f1-44b5-b1da-5fa9cc7b08b2","html_url":"https://github.com/khalidelboray/raku-text-slugify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidelboray%2Fraku-text-slugify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidelboray%2Fraku-text-slugify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidelboray%2Fraku-text-slugify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidelboray%2Fraku-text-slugify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khalidelboray","download_url":"https://codeload.github.com/khalidelboray/raku-text-slugify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243885880,"owners_count":20363642,"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":["raku","raku-module","slugify","text"],"created_at":"2024-11-22T14:24:15.574Z","updated_at":"2025-03-16T14:41:19.318Z","avatar_url":"https://github.com/khalidelboray.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/khalidelboray/raku-text-slugify.svg?branch=master)](https://travis-ci.org/khalidelboray/raku-text-slugify)\n\nNAME\n====\n\n\n\n`Text::Slugify` - create a URL slug from text. \n\n\n\nSYNOPSIS\n========\n\n\n\n```perl6\n    use Text::Slugify;\n\n    my $txt;\n\n    $txt = \"This is a test ---\";\n    slugify $txt; \n    #=\u003e «this-is-a-test»\n\n    $txt = 'C\\'est déjà l\\'été.';\n    slugify $txt;\n    #=\u003e «c-est-deja-l-ete»\n\n    $txt = 'jaja---lol-méméméoo--a';\n    slugify $txt, :max-length(9);\n    #=\u003e «jaja-lol»\n```\n\nFor more examples, have a look at the test file (`t/basic.t6`).\n\nDESCRIPTION\n===========\n\n\n\n`Text::Slugify` is a module to slugify text. It takes a piece of text, removes punctuation, spaces and other unwanted characters to produce a string suitable for use in a URL.\n\nINSTALLATION\n============\n\n\n\nUsing zef:\n----------\n\n    zef update \u0026\u0026 zef install Text::Slugify\n\nFrom source:\n------------\n\n    git clone https://github.com/khalidelboray/raku-text-slugify.git\n    cd raku-text-slugify \u0026\u0026 zef install .\n\nSUBROUTINES\n===========\n\n\n\nThe module exports the following subroutines:\n\n#### `slugify`\n\n```perl6\n    sub slugify(\n        Str:D $text is copy,            # Text to be slugified.\n        Int:D :$max-length = 0,         # Output string length.\n        :$separator = \"-\",              # Separator between words.\n        :$regex-pattern = Nil,          # Regex pattern for allowed characters in output text.\n        :@stopwords = [],               # Words to be discounted from output text.\n        :@replacements = [],            # List of replacement rule pairs e.g. ['|'=\u003e'or', '%'=\u003e'percent']\n        Bool:D :$entities = True, \n        Bool:D :$decimal = True, \n        Bool:D :$hexadecimal = True, \n        Bool:D :$word-boundary = False, \n        Bool:D :$lowercase = True,      # Set case sensitivity by setting it to False.\n        Bool:D :$save-order = False,    # If True and max-length \u003e 0 return whole words in the initial order.\n    )\n```\n\n#### `smart-truncate`\n\n```perl6\n    sub smart-truncate(\n        Str:D $string is rw,             # String to be modified.\n        Int:D :$max-length = 0,          # Output string length.\n        Bool:D :$word-boundary = False,  \n        Str:D :$separator = \" \",         # Separator between words.\n        Bool:D :$save-order = False,     # Output text's word order same as input.\n    )\n```\n\n**NOTE**: To import the subroutine `smart-truncate` or `strip` alongside `slugify` into your code, use `use Text::Slugify :ALL`.\n\nCREDIT-REFERENCE\n================\n\n\n\nThis module is mostly based on [Python Slugify](https://github.com/un33k/python-slugify).\n\nThis is my fork of [https://gitlab.com/uzluisf/raku-text-slugify](https://gitlab.com/uzluisf/raku-text-slugify)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidelboray%2Fraku-text-slugify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhalidelboray%2Fraku-text-slugify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidelboray%2Fraku-text-slugify/lists"}