Commit d543bd3e authored by Matthias Braun's avatar Matthias Braun
Browse files

gen_docu: fix missing attributes, show generation time at the end

parent 8e99c7e1
......@@ -3,7 +3,7 @@ import sys
import re
import docutils.core
import docutils.writers.html4css1
from subprocess import Popen, PIPE
from datetime import datetime
from jinja2 import Environment, Template
from jinja2.filters import do_dictsort
from spec_util import is_dynamic_pinned, verify_node, isAbstract, setdefault
......@@ -76,7 +76,7 @@ docu_template = env.from_string(
{% endfor %}
</dl>
{% endif %}
{% if node.attributes %}
{% if node.attrs %}
<h5>Attributes</h5>
<dl>
{% for attr in node.attrs %}
......@@ -104,6 +104,9 @@ docu_template = env.from_string(
</div>
</div>
</div>
<div class="footer">
Generated {{time}}
</div>
</body>
</html>
''')
......@@ -125,6 +128,7 @@ def prepare_nodes():
def main(argv):
real_nodes = prepare_nodes()
sys.stdout.write(docu_template.render(nodes = real_nodes))
time = datetime.now().replace(microsecond=0).isoformat(' ')
sys.stdout.write(docu_template.render(nodes = real_nodes, time=time))
main(sys.argv)
......@@ -70,6 +70,18 @@ div.sidebar input {
font-size: 1em;
}
div.footer {
width: 940px;
margin: 20px auto 30px auto;
font-size: 14px;
color: #888;
text-align: right;
}
div.footer a {
color: #888;
}
a {
color: #aa0000;
text-decoration: underline;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment