{ "info": { "author": "Ronie Martinez", "author_email": "ronmarti18@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": "# permissive-slugify\n\nFork of [un33k/python-slugify](https://github.com/un33k/python-slugify) to fix [issue 68](https://github.com/un33k/python-slugify/issues/68).\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
LicenseVersion
Travis CICoverage
AppVeyorSupported versions
WheelImplementation
StatusDownloads
Show your support
\n\n## Improvements\n\n- Support for `extras_require` and `cmdclass`\n- Refactored\n- Deploy from Travis CI\n- Added Appveyor Integration\n- Uses `pytest`\n- Uses CodeCov\n\n## How to install\n\nBy default, permissive-slugify uses [Unidecode](https://github.com/avian2/unidecode) as decoder which is GPL-licensed.\n\n```bash\npip install permissive-slugify\n```\n\n### Specifying decoder\n\nYou can specify which decoder will be used:\n\n- [Unidecode](https://github.com/avian2/unidecode) - *(GPL-licensed)*.\n\n ```bash\n pip install permissive-slugify[unidecode]\n easy_install permissive-slugify[unidecode]\n ```\n\n- [text-unidecode](https://github.com/kmike/text-unidecode) *(GPL & Perl Artistic)*\n\n ```bash\n pip install permissive-slugify[text-unidecode]\n easy_install permissive-slugify[text-unidecode]\n ```\n\n## How to use\n\n```python\n# -*- coding: utf-8 -*-\nfrom slugify import slugify\n\ntxt = \"This is a test ---\"\nslug = slugify(txt)\nassert slug == \"this-is-a-test\"\n\ntxt = '\u5f71\u5e2b\u55ce'\nslug = slugify(txt)\nassert slug == \"ying-shi-ma\"\n\ntxt = 'C\\'est d\u00e9j\u00e0 l\\'\u00e9t\u00e9.'\nslug = slugify(txt)\nassert slug == \"c-est-deja-l-ete\"\n\ntxt = 'N\u00edn h\u01ceo. W\u01d2 sh\u00ec zh\u014dng gu\u00f3 r\u00e9n'\nslug = slugify(txt)\nassert slug == \"nin-hao-wo-shi-zhong-guo-ren\"\n\ntxt = '\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440'\nslug = slugify(txt)\nassert slug == \"kompiuter\"\n\ntxt = 'jaja---lol-m\u00e9m\u00e9m\u00e9oo--a'\nslug = slugify(txt, max_length=9)\nassert slug == \"jaja-lol\"\n\ntxt = 'jaja---lol-m\u00e9m\u00e9m\u00e9oo--a'\nslug = slugify(txt, max_length=15, word_boundary=True)\nassert slug == \"jaja-lol-a\"\n\ntxt = 'jaja---lol-m\u00e9m\u00e9m\u00e9oo--a'\nslug = slugify(txt, max_length=20, word_boundary=True, separator=\".\")\nassert slug == \"jaja.lol.mememeoo.a\"\n\ntxt = 'one two three four five'\nslug = slugify(txt, max_length=13, word_boundary=True, save_order=True)\nassert slug == \"one-two-three\"\n\ntxt = 'the quick brown fox jumps over the lazy dog'\nslug = slugify(txt, stopwords=['the'])\nassert slug == 'quick-brown-fox-jumps-over-lazy-dog'\n\ntxt = 'the quick brown fox jumps over the lazy dog in a hurry'\nslug = slugify(txt, stopwords=['the', 'in', 'a', 'hurry'])\nassert slug == 'quick-brown-fox-jumps-over-lazy-dog'\n\ntxt = 'thIs Has a stopword Stopword'\nslug = slugify(txt, stopwords=['Stopword'], lowercase=False)\nassert slug == 'thIs-Has-a-stopword'\n\ntxt = \"___This is a test___\"\nregex_pattern = r'[^-a-z0-9_]+'\nslug = slugify(txt, regex_pattern=regex_pattern)\nassert slug == \"___this-is-a-test___\"\n\ntxt = \"___This is a test___\"\nregex_pattern = r'[^-a-z0-9_]+'\nslug = slugify(txt, separator='_', regex_pattern=regex_pattern)\nassert slug != \"_this_is_a_test_\"\n\ntxt = '10 | 20 %'\nslug = slugify(txt, replacements=[['|', 'or'], ['%', 'percent']])\nassert slug == \"10-or-20-percent\"\n\n```\n\n## References\n\n- [Add ability to specify \"default\" extras_require](https://github.com/pypa/setuptools/issues/1139)\n- [setup.py not ran on wheels](https://stackoverflow.com/questions/40433168/running-custom-code-with-pip-install-fails#comment75920547_40434969)\n\n## Author\n\n- Original - [Val Neekman](https://github.com/un33k/python-slugify)\n- Modified by [Ronie Martinez](mailto:ronmarti18@gmail.com)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/roniemartinez/permissive-slugify/tarball/1.0.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/roniemartinez/permissive-slugify", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "permissive-slugify", "package_url": "https://pypi.org/project/permissive-slugify/", "platform": "", "project_url": "https://pypi.org/project/permissive-slugify/", "project_urls": { "Download": "https://github.com/roniemartinez/permissive-slugify/tarball/1.0.0", "Homepage": "https://github.com/roniemartinez/permissive-slugify" }, "release_url": "https://pypi.org/project/permissive-slugify/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Fork of un33k/python-slugify to fix issue #68", "version": "1.0.0" }, "last_serial": 4688948, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1a6cda70433bc53a173194a6e8310aba", "sha256": "5509b9dce00260fe84b4e142aae32ff46d332452db56a11eebc9c20251805eea" }, "downloads": -1, "filename": "permissive-slugify-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1a6cda70433bc53a173194a6e8310aba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6314, "upload_time": "2019-01-12T18:07:34", "url": "https://files.pythonhosted.org/packages/95/34/0f59f950c6e9d94dc09a5675c711cf39b7da53b4d673c0c79ab71575cccd/permissive-slugify-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1a6cda70433bc53a173194a6e8310aba", "sha256": "5509b9dce00260fe84b4e142aae32ff46d332452db56a11eebc9c20251805eea" }, "downloads": -1, "filename": "permissive-slugify-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1a6cda70433bc53a173194a6e8310aba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6314, "upload_time": "2019-01-12T18:07:34", "url": "https://files.pythonhosted.org/packages/95/34/0f59f950c6e9d94dc09a5675c711cf39b7da53b4d673c0c79ab71575cccd/permissive-slugify-1.0.0.tar.gz" } ] }