Created
July 18, 2011 23:55
-
-
Save erikrose/1090980 to your computer and use it in GitHub Desktop.
Regex to turn Sphinx method and class refs into normal reST, for PyPI display
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""This is how I include a dumbed-down copy of the ordinarily Sphinxified version history in my PyPI README.rst in django-tidings.""" | |
re.sub(r':[a-zA-Z]+:`[0-9a-zA-Z~_\.]+\.([^`]+)`', | |
r'``\1``', | |
open('docs/changes.rst').read()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment