Remove stuff from 20_events.rst and replace with {{room_events}}. Update gendoc to call build.py for template vars.

This commit is contained in:
Kegan Dougal 2015-05-20 15:40:06 +01:00
parent 66bbc30893
commit 02c44a889e
4 changed files with 14 additions and 225 deletions

View file

@ -90,6 +90,14 @@ def rst2html(i, o):
settings_overrides=stylesheets
)
def run_through_template(input):
null = open(os.devnull, 'w')
subprocess.check_output(
['python', 'build.py', "-o", "../scripts/tmp", "../scripts/"+input],
stderr=null,
cwd="../templating",
)
def prepare_env():
try:
os.makedirs("./gen")
@ -101,12 +109,12 @@ def prepare_env():
pass
def cleanup_env():
#pass
shutil.rmtree("./tmp")
def main():
prepare_env()
glob_spec_to("tmp/full_spec.rst")
run_through_template("tmp/full_spec.rst")
shutil.copy("../supporting-docs/howtos/client-server.rst", "tmp/howto.rst")
set_git_version("tmp/full_spec.rst")
set_git_version("tmp/howto.rst")