-
Notifications
You must be signed in to change notification settings - Fork 110
Welcome to the python‐slugify wiki!
Val Neekman edited this page Feb 4, 2024
·
1 revision
- Clone the repo on your system
git clone [email protected]:un33k/python-slugify.git
- Make a branch for your fix or enhancement or new feature
git checkout ci; git merge master; git checkout -b feat/<somename>
- Finish your code and test
python test
- Verify syntax changes
bash format.sh
- Commit your code, and push
git add .; git commit -am "reason of commit"; git push
- Go to GitHub and raise a PR against the CI branch of the main repository
- Entity decoding is fully disabled only if you specify all three options (entities=False, hexadecimal=False, decimal=False) (https://github.com/un33k/python-slugify/issues/79)
- In some IDEs (e.g. Pycharm),
from slugify import slugify
might automatically install the missing package for you. In this example, a package calledslugify
will be instead. To you this package you need to installpython-slugify
yourself. (https://github.com/un33k/python-slugify/issues/81)
- If you want to see a list of options you can pass into
slugify()
, you can refer to the readme file. (Parameters & Options)
- This package is under the MIT license. This package by default installs
text-unidecode
. But you can instead useunidecode
. (Install Options)
Though the dependencies may be GPL licensed, python-slugify itself is not considered a derivative work and will remain under the MIT license. If you wish to avoid installation of any GPL-licensed packages, please note that the default dependency text-unidecode explicitly lets you choose to use the Artistic License instead. Use without concern.
The unidecode
package is believed to be more advanced than text-unidecode
, especially regarding some ambiguous charters.
Unidecode
:
𝙎
-> s
𝘽
-> b
Input text
: Drake - WizKid Kyla - One Dance (𝙎𝙇𝙊𝙒𝙀𝘿 + 𝙍𝙀𝙑𝙀𝙍𝘽)
Output slug
: drake-wizkid-kyla-one-dance-slowed-reverb
text-unidecode
:
𝙎
->
𝘽
->
Input text
: Drake - WizKid Kyla - One Dance (𝙎𝙇𝙊𝙒𝙀𝘿 + 𝙍𝙀𝙑𝙀𝙍𝘽)
Output slug
: drake-wizkid-kyla-one-dance
- This package is called
python-slugify
and keeps its version within the package itself and not in the name. If you seepython-slugify2
orpython-slugify3
etc, they are unauthorized clones. Please make sure you and your IDE installpython-slugify
in order to get the latest updates.
- To pre-translate some characters, you can use
replacements
params. (https://github.com/un33k/python-slugify/issues/85)
- Please make sure you raise your PR against the
staging
branch as changelog and versioning must be sorted out prior to merging into master.
- python-slugify is the name of this package, it keeps track of versioning internally. Please refrain from forking the package and publishing it to pypi under
python-slugify2
orpython-slugify3
. - It will confuse people, it infringes on this package, etc.
- I encourage you to contribute to this package instead to avoid fragmentation
- We disable test for Python versions that are no longer officially supported, however, the package may still work with those versions.
- Python 2.7 will lose official support on January 1, 2020, and we will remove it from our tests then.