opencolorio_config_aces.utilities.slugify#
- opencolorio_config_aces.utilities.slugify(object_: Any, allow_unicode: bool = False) str[source]#
Generate a SEO friendly and human-readable slug from given object.
Convert to ASCII if
allow_unicodeis False. Convert spaces or repeated dashes to single dashes. Remove characters that aren’t alphanumerics, underscores, or hyphens. Convert to lowercase. Also strip leading and trailing whitespace, dashes, and underscores.- Parameters:
- Returns:
Generated slug.
- Return type:
References
Examples
>>> slugify( ... " Jack & Jill like numbers 1,2,3 and 4 and silly characters ?%.$!/" ... ) 'jack-jill-like-numbers-123-and-4-and-silly-characters'