Move templating into scripts dir

There's no real need for this to be at the top level.
pull/977/head
Richard van der Hoff 7 years ago
parent d9285cf5b5
commit a38d4fc68e

@ -28,8 +28,6 @@ Structure of this repository
- ``scripts``: scripts to generate formatted versions of the
documentation, typically HTML.
- ``specification``: the specification split up into sections.
- ``templating``: the templates and templating system used to
generate the spec.
.. _OpenAPI: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
.. _JSON Schema: http://json-schema.org/

@ -52,7 +52,7 @@ func main() {
walker := makeWalker(dir, w)
paths := []string{"api", "changelogs", "event-schemas", "scripts",
"specification", "templating"}
"specification"}
for _, p := range paths {
filepath.Walk(path.Join(dir, p), walker)

@ -30,7 +30,7 @@ import yaml
scripts_dir = os.path.dirname(os.path.abspath(__file__))
templating_dir = os.path.join(os.path.dirname(scripts_dir), "templating")
templating_dir = os.path.join(scripts_dir, "templating")
api_dir = os.path.join(os.path.dirname(scripts_dir), "api")
sys.path.insert(0, templating_dir)

@ -273,7 +273,7 @@ def addAnchors(path):
def run_through_template(input_files, set_verbose, substitutions):
args = [
'python', 'build.py',
'python', script_dir+'/templating/build.py',
"-o", tmp_dir,
"-i", "matrix_templates",
]
@ -288,10 +288,7 @@ def run_through_template(input_files, set_verbose, substitutions):
log("EXEC: %s" % " ".join(args))
log(" ==== build.py output ==== ")
subprocess.check_call(
args,
cwd=os.path.join(docs_dir, "templating"),
)
subprocess.check_call(args)
"""
Extract and resolve groups for the given target in the given targets listing.

@ -25,23 +25,27 @@ from collections import OrderedDict
import logging
import json
import os
import os.path
import re
import subprocess
import sys
import urllib
import yaml
matrix_doc_dir=reduce(lambda acc,_: os.path.dirname(acc),
range(1, 5), os.path.abspath(__file__))
HTTP_APIS = {
"../api/application-service": "as",
"../api/client-server": "cs",
"../api/identity": "is",
"../api/push-gateway": "push",
os.path.join(matrix_doc_dir, "api/application-service"): "as",
os.path.join(matrix_doc_dir, "api/client-server"): "cs",
os.path.join(matrix_doc_dir, "api/identity"): "is",
os.path.join(matrix_doc_dir, "api/push-gateway"): "push",
}
EVENT_EXAMPLES = "../event-schemas/examples"
EVENT_SCHEMA = "../event-schemas/schema"
CORE_EVENT_SCHEMA = "../event-schemas/schema/core-event-schema"
CHANGELOG_DIR = "../changelogs"
TARGETS = "../specification/targets.yaml"
EVENT_EXAMPLES = os.path.join(matrix_doc_dir, "event-schemas/examples")
EVENT_SCHEMA = os.path.join(matrix_doc_dir, "event-schemas/schema")
CORE_EVENT_SCHEMA = os.path.join(matrix_doc_dir, "event-schemas/schema/core-event-schema")
CHANGELOG_DIR = os.path.join(matrix_doc_dir, "changelogs")
TARGETS = os.path.join(matrix_doc_dir, "specification/targets.yaml")
ROOM_EVENT = "core-event-schema/room_event.yaml"
STATE_EVENT = "core-event-schema/state_event.yaml"
Loading…
Cancel
Save