Skip to content

Welcome to the python‐slugify wiki!

Val Neekman edited this page Feb 4, 2024 · 1 revision

Welcome to the python-slugify wiki!

To raise a PR:

  1. Clone the repo on your system
git clone git@github.com:un33k/python-slugify.git
  1. Make a branch for your fix or enhancement or new feature
git checkout ci; git merge master; git checkout -b feat/<somename>
  1. Finish your code and test
python test
  1. Verify syntax changes
bash format.sh
  1. Commit your code, and push
git add .; git commit -am "reason of commit"; git push
  1. Go to GitHub and raise a PR against the CI branch of the main repository

-------------------

Migrating form awesome-slugify

If you are using IDEs like PyCharm

Documentations

  • If you want to see a list of options you can pass into slugify(), you can refer to the readme file. (Parameters & Options)

License

  • This package is under the MIT license. This package by default installs text-unidecode. But you can instead use unidecode. (Install Options)

Notes on GPL dependencies

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.

Notes on Unidecode

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

more info

Versioning

  • This package is called python-slugify and keeps its version within the package itself and not in the name. If you see python-slugify2 or python-slugify3 etc, they are unauthorized clones. Please make sure you and your IDE install python-slugify in order to get the latest updates.

Pretranslation options

Contribution

  • Please make sure you raise your PR against the staging branch as changelog and versioning must be sorted out prior to merging into master.

Forking

  • 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 or python-slugify3.
  • It will confuse people, it infringes on this package, etc.
  • I encourage you to contribute to this package instead to avoid fragmentation

Python Support

  • 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.