Skip to main content

Proper title-casing for Python's Markdown.

Project description

Markdown title-casing extension

Python’s Markdown extension to apply proper English title-casing.

This project use titlecase module under the hood. Transformation is applied on content enclosed in <h1> to <h6> HTML tags. Meta-Data extension is supported so that document title can be transformed too.

Stable release: Last release Software license Requirements freshness Popularity

Development: Unit-tests status Coverage Status Code Quality

Install

This package is available on PyPi, so you can install the latest stable release and its dependencies with a simple pip call:

$ pip install mdx_titlecase

See also pip installation instructions.

Configuration

Parameter

Default value

Description

metadata

['title', ]

List of metadata keys to which apply titlecasing.

Development

Check out latest development branch:

$ git clone git@github.com:kdeldycke/mdx_titlecase.git
$ cd ./mdx_titlecase
$ python ./setup.py develop

Run unit-tests:

$ python ./setup.py nosetests

Run PEP8 and Pylint code style checks:

$ pip install pep8 pylint
$ pep8 mdx_titlecase
$ pylint --rcfile=setup.cfg mdx_titlecase

Stability policy

Here is a bunch of rules we’re trying to follow regarding stability:

  • Patch releases (0.x.n0.x.(n+1) upgrades) are bug-fix only. These releases must not break anything and keeps backward-compatibility with 0.x.* and 0.(x-1).* series.

  • Minor releases (0.n.*0.(n+1).0 upgrades) includes any non-bugfix changes. These releases must be backward-compatible with any 0.n.* version but are allowed to drop compatibility with the 0.(n-1).* series and below.

  • Major releases (n.*.*(n+1).0.0 upgrades) are not planned yet: we’re still in beta and the final feature set of the 1.0.0 release is not decided yet.

Release process

Start from the develop branch:

$ git clone git@github.com:kdeldycke/mdx_titlecase.git
$ git checkout develop

Revision should already be set to the next version, so we just need to set the released date in the changelog:

$ vi ./CHANGES.rst

Create a release commit, tag it and merge it back to master branch:

$ git add ./mdx_titlecase/__init__.py ./CHANGES.rst
$ git commit -m "Release vX.Y.Z"
$ git tag "vX.Y.Z"
$ git push
$ git push --tags
$ git checkout master
$ git pull
$ git merge "vX.Y.Z"
$ git push

Push packaging to the test cheeseshop:

$ pip install wheel
$ python ./setup.py register -r testpypi
$ python ./setup.py clean
$ rm -rf ./build ./dist
$ python ./setup.py sdist bdist_egg bdist_wheel upload -r testpypi

Publish packaging to PyPi:

$ python ./setup.py register -r pypi
$ python ./setup.py clean
$ rm -rf ./build ./dist
$ python ./setup.py sdist bdist_egg bdist_wheel upload -r pypi

Bump revision back to its development state:

$ pip install bumpversion
$ git checkout develop
$ bumpversion --verbose patch
$ git add ./mdx_titlecase/__init__.py ./CHANGES.rst
$ git commit -m "Post release version bump."
$ git push

Now if the next revision is no longer bug-fix only:

$ bumpversion --verbose minor
$ git add ./mdx_titlecase/__init__.py ./CHANGES.rst
$ git commit -m "Next release no longer bug-fix only. Bump revision."
$ git push

License

This software is licensed under the GNU General Public License v2 or later (GPLv2+).

ChangeLog

1.1.0 (2015-11-29)

  • Allow title casing of metadata.

1.0.1 (2015-11-23)

  • Switch from coveralls.io to codecov.io.

1.0.0 (2015-11-23)

  • First public release.

0.0.0 (2015-11-22)

  • First commit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdx_titlecase-1.1.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distributions

mdx_titlecase-1.1.0-py2.7.egg (7.1 kB view details)

Uploaded Source

mdx_titlecase-1.1.0-py2-none-any.whl (10.1 kB view details)

Uploaded Python 2

File details

Details for the file mdx_titlecase-1.1.0.tar.gz.

File metadata

File hashes

Hashes for mdx_titlecase-1.1.0.tar.gz
Algorithm Hash digest
SHA256 665628edcb3da6e0e0907848131907bb4241fc23df3f0d934b4858b6ccd8de60
MD5 1c28a2c93c53d7a668ea3106a66d73f2
BLAKE2b-256 b065c224bb759b7403aa7f181b70c0e75d53c54368006bddeb770d633673b175

See more details on using hashes here.

File details

Details for the file mdx_titlecase-1.1.0-py2.7.egg.

File metadata

File hashes

Hashes for mdx_titlecase-1.1.0-py2.7.egg
Algorithm Hash digest
SHA256 756d030070a24165aed51ed3eea8f2310ea2970a8a163065b9e0c1b2dafc9133
MD5 b1485307ce1ecc5d8c2702030f18d2a9
BLAKE2b-256 a72dfdc4b4cded1958e0c2c0b47de6ead59ac63862e77816b60e3abbfa4f9b35

See more details on using hashes here.

File details

Details for the file mdx_titlecase-1.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for mdx_titlecase-1.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 6e0a9941bfe1d92186ce37bd7b3860b2d596f5df248df8f14c56885aff66cd63
MD5 c712af4ee421b5966b6de62632a81ddb
BLAKE2b-256 f2349517a5d6452977902b819bbf8b7be54dabc55573337dddad64f8fcfd4443

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page