Add {{voip_events}}. Add more info on sections when asked via build.py -s
This commit is contained in:
parent
2a02b3494f
commit
9d532f30e8
4 changed files with 30 additions and 87 deletions
|
@ -7,6 +7,13 @@ import os
|
|||
|
||||
class MatrixSections(Sections):
|
||||
|
||||
# pass through git ver so it'll be dropped in the input file
|
||||
def render_git_version(self):
|
||||
return self.units.get("git_version")
|
||||
|
||||
def render_spec_version(self):
|
||||
return "0.1.0"
|
||||
|
||||
def render_room_events(self):
|
||||
template = self.env.get_template("events.tmpl")
|
||||
examples = self.units.get("event_examples")
|
||||
|
@ -21,12 +28,19 @@ class MatrixSections(Sections):
|
|||
))
|
||||
return "\n\n".join(sections)
|
||||
|
||||
# pass through git ver so it'll be dropped in the input file
|
||||
def render_git_version(self):
|
||||
return self.units.get("git_version")
|
||||
|
||||
def render_spec_version(self):
|
||||
return "0.1.0"
|
||||
def render_voip_events(self):
|
||||
template = self.env.get_template("events.tmpl")
|
||||
examples = self.units.get("event_examples")
|
||||
schemas = self.units.get("event_schemas")
|
||||
sections = []
|
||||
for event_name in sorted(schemas):
|
||||
if not event_name.startswith("m.call"):
|
||||
continue
|
||||
sections.append(template.render(
|
||||
example=examples[event_name],
|
||||
event=schemas[event_name]
|
||||
))
|
||||
return "\n\n".join(sections)
|
||||
|
||||
def _render_ce_type(self, type):
|
||||
template = self.env.get_template("common-event-fields.tmpl")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue