Render rst file to doc/source

This change renders dynamic rst file to doc/source instead of candidate directory
so that they gets published by infra docs jobs. This is just to be able to access
the source rst file on docs-draft.openstack.org host.

Change-Id: I2435531d091ff051338c4ba9a495834d6653ab68
This commit is contained in:
Tristan Cacqueray 2016-11-09 03:12:51 +00:00
parent 2e929687cc
commit c97fdd8b65
4 changed files with 7 additions and 7 deletions

6
.gitignore vendored
View File

@ -8,11 +8,11 @@ reference/projects/*.rst
*.pyc
AUTHORS
ChangeLog
candidates/ptl.rst
candidates/tc.rst
candidates/events.rst
.projects*yaml
.projects*.pkl
.testrepository
doc/source/archive_toc.rst
doc/source/*/*.rst
doc/source/ptl.rst
doc/source/tc.rst
doc/source/events.rst

View File

@ -30,7 +30,7 @@ def render_template(template, data, **kwargs):
def render_list(list_type, candidates_list):
output_file = os.path.join(utils.CANDIDATE_PATH, "%s.rst" % list_type)
output_file = os.path.join(".", "doc", "source", "%s.rst" % list_type)
template_name = "%s.jinja" % list_type
template_dir = os.path.join(".", "doc", "source", "_exts")
with open(output_file, "w") as out:

View File

@ -42,7 +42,7 @@ def build_timer(app):
outdated = ''
ev['date_str'] = "%s%s, %s UTC%s" % (outdated, d, h, outdated)
ev['name_str'] = "%s%s%s" % (outdated, ev['name'], outdated)
output_file = os.path.join(utils.CANDIDATE_PATH, "events.rst")
output_file = os.path.join(".", "doc", "source", "events.rst")
with open(output_file, "w") as out:
template_dir = os.path.join(".", "doc", "source", "_exts")
loader = jinja2.FileSystemLoader(template_dir)

View File

@ -8,14 +8,14 @@
OpenStack Election
==================
.. include:: ../../candidates/events.rst
.. include:: events.rst
See `Election system`_, `PTL details`_ and `TC details`_.
.. Below is the official list of candidates for the current round.
.. TODO: Change from ptl.rst to tc.rst when TC rounds starts
.. .. include:: ../../candidates/tc.rst
.. .. include:: tc.rst
Previous elections