Readme as reStructuredText

Sphinx always included the readme file into the generated documentation.
Since Markdown and reStructuredText are not fully compatible, the output
was now partly broken. This moves to reStructuredText only to avoid that
problem.

Signed-off-by: Lars Kiesow <lkiesow@uos.de>
This commit is contained in:
Lars Kiesow 2016-12-22 00:05:55 +01:00
parent 444855a248
commit ed3ebb4db6
No known key found for this signature in database
GPG key ID: 5DAFE8D9C823CE73
2 changed files with 10 additions and 10 deletions

View file

@ -260,7 +260,7 @@ r2 = re.compile(r'.. include-github-readme')
def substitute_link(app, docname, text): def substitute_link(app, docname, text):
if docname == 'index': if docname == 'index':
readme_text = '' readme_text = ''
with codecs.open(os.path.abspath('../readme.md'), 'r', 'utf-8') as f: with codecs.open(os.path.abspath('../readme.rst'), 'r', 'utf-8') as f:
readme_text = r.sub(r'`\1 <\2>`_', f.read()) readme_text = r.sub(r'`\1 <\2>`_', f.read())
text[0] = r2.sub(readme_text, text[0]) text[0] = r2.sub(readme_text, text[0])

View file

@ -2,12 +2,13 @@
Feedgenerator Feedgenerator
============= =============
[![Build Status](https://travis-ci.org/lkiesow/python-feedgen.svg?branch=master) .. image:: https://travis-ci.org/lkiesow/python-feedgen.svg?branch=master
](https://travis-ci.org/lkiesow/python-feedgen) :target: https://travis-ci.org/lkiesow/python-feedgen
:alt: Build Status
This module can be used to generate web feeds in both ATOM and RSS format. It This module can be used to generate web feeds in both ATOM and RSS format. It
has support for extensions. Included is for example an extension to produce has support for extensions. Included is for example an extension to produce Podcasts.
Podcasts.
It is licensed under the terms of both, the FreeBSD license and the LGPLv3+. It is licensed under the terms of both, the FreeBSD license and the LGPLv3+.
Choose the one which is more convenient for you. For more details have a look Choose the one which is more convenient for you. For more details have a look
@ -29,14 +30,13 @@ Installation
If you are running Fedora Linux, RedHat Enterprise Linux, CentOS or Scientific If you are running Fedora Linux, RedHat Enterprise Linux, CentOS or Scientific
Linux you can use the RPM Copr repostiory: Linux you can use the RPM Copr repostiory:
[http://copr.fedoraproject.org/coprs/lkiesow/python-feedgen/ http://copr.fedoraproject.org/coprs/lkiesow/python-feedgen/
](http://copr.fedoraproject.org/coprs/lkiesow/python-feedgen/)
Simply enable the repository and run: Simply enable the repository and run::
$ yum install python-feedgen $ yum install python-feedgen
or for the Python 3 package: or for the Python 3 package::
$ yum install python3-feedgen $ yum install python3-feedgen
@ -183,4 +183,4 @@ You can test the module by simply executing::
If you want to have a look at the code for this test to have a working code If you want to have a look at the code for this test to have a working code
example for a whole feed generation process, you can find it in the example for a whole feed generation process, you can find it in the
[`__main__.py`](https://github.com/lkiesow/python-feedgen/blob/master/feedgen/__main__.py). `__main__.py <https://github.com/lkiesow/python-feedgen/blob/master/feedgen/__main__.py>`_.