Skip to content

Commit 214a51a

Browse files
committed
- add missing html tag "</p>"
- replace spaces for indentation with tabs and move indentation of dyn-html commands into the commands itself to. This reduces the size of the output html and makes generated output much cleaner. (needed for embedded devices with small storage) Signed-off-by: Stephan Enderlein <[email protected]>
1 parent 71afd0a commit 214a51a

File tree

1 file changed

+68
-88
lines changed

1 file changed

+68
-88
lines changed

templates/default_html.template

Lines changed: 68 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -22,92 +22,72 @@ See "get_license_file_key" in `attrib.py` for more information
2222
#}
2323
<!doctype html>
2424
<html>
25-
<head>
26-
<style type="text/css">
27-
div.additional-license-text-list {display:block}
28-
body {font-family: Helvetica, Arial, sans-serif;}
29-
pre {white-space: pre-wrap;}
30-
</style>
31-
<title>Open Source Software Information</title>
32-
</head>
33-
34-
<body>
35-
<h1>OPEN SOURCE SOFTWARE INFORMATION</h1>
36-
<div>
37-
<p>Licenses, acknowledgments and required copyright notices for
38-
open source components:</p>
39-
</div>
40-
41-
<div class="oss-table-of-contents">
42-
{% for about_object in abouts %}
43-
<p><a href="#component_{{ loop.index0 }}">{{ about_object.name.value }}{% if about_object.version.value %} {{ about_object.version.value }}{% endif %}</a></p>
44-
{% endfor %}
45-
</div>
46-
47-
<hr/>
48-
49-
50-
{% for about_object in abouts %}
51-
<div class="oss-component" id="component_{{ loop.index0 }}">
52-
<h3 class="component-name">{{ about_object.name.value }}
53-
{% if about_object.version.value %}{{ about_object.version.value }}{% endif %}
54-
</h3>
55-
{% if about_object.license_expression.value %}
56-
<p>This component is licensed under
57-
{{ about_object.license_expression.value }}
58-
{% endif %}
59-
{% if about_object.copyright.value %}
60-
<pre>{{about_object.copyright.value}}</pre>
61-
{% endif %}
62-
{% if about_object.notice_file.value %}
63-
{% for notice in about_object.notice_file.value %}
64-
<pre class="component-notice">{{ about_object.notice_file.value[notice] }}</pre>
65-
{% endfor %}
66-
{% endif %}
67-
{% if about_object.license_key.value %}
68-
{% for license_key in about_object.license_key.value %}
69-
{% if license_key in common_licenses %}
70-
<p>Full text of
71-
<a class="{{ license_key }}" href="#component-license-{{ license_key }}">
72-
{{ license_key }}
73-
</a>
74-
is available at the end of this document.</p>
75-
{% endif %}
76-
{% endfor %}
77-
{% if about_object.license_file.value %}
78-
{% for lic_file_name in about_object.license_file.value %}
79-
{% if not license_file_key_and_license_key[license_file_name_and_license_file_key[lic_file_name]] in common_licenses %}
80-
{% if about_object.license_file.value[lic_file_name] %}
81-
<pre>{{ about_object.license_file.value[lic_file_name] | e}}</pre>
82-
{% endif %}
83-
{% endif %}
84-
{% endfor %}
85-
{% endif %}
86-
{% else %}
87-
{% if about_object.license_file.value %}
88-
{% for lic_file_name in about_object.license_file.value %}
89-
{% if about_object.license_file.value[lic_file_name] %}
90-
<pre>{{ about_object.license_file.value[lic_file_name] | e}}</pre>
91-
{% endif %}
92-
{% endfor %}
93-
{% endif %}
94-
{% endif %}
95-
</div>
96-
{% endfor %}
97-
98-
<hr/>
99-
100-
<h3>Common Licenses Used in This Product</h3>
101-
102-
{% for key in license_file_key_and_context %}
103-
{% if key in common_licenses %}
104-
<h3 id="component-license-{{ key }}">{{ key }}</h3>
105-
<pre>{{ license_file_key_and_context[key]|e }}</pre>
106-
{% endif %}
107-
{% endfor %}
108-
109-
<h3><a id="End">End</a></h3>
110-
<i>This file was generated with AboutCode Toolkit version: {{ tkversion }} on: {{ utcnow }} (UTC)</i>
111-
</body>
25+
<head>
26+
<style type="text/css">
27+
div.additional-license-text-list {display:block}
28+
body {font-family: Helvetica, Arial, sans-serif;}
29+
pre {white-space: pre-wrap;}
30+
</style>
31+
<title>Open Source Software Information</title>
32+
</head>
33+
<body>
34+
<h1>OPEN SOURCE SOFTWARE INFORMATION</h1>
35+
<div> <p>Licenses, acknowledgments and required copyright notices for open source components:</p> </div>
36+
<div class="oss-table-of-contents">
37+
{% for about_object in abouts %}
38+
<p><a href="#component_{{ loop.index0 }}">{{ about_object.name.value }}{% if about_object.version.value %} {{ about_object.version.value }}{% endif %}</a></p>
39+
{% endfor %}
40+
</div>
41+
<hr/>
42+
{% for about_object in abouts %}
43+
<div class="oss-component" id="component_{{ loop.index0 }}">
44+
<h3 class="component-name">{{ about_object.name.value }} {% if about_object.version.value %}{{ about_object.version.value }}{% endif %} </h3>
45+
{% if about_object.license_expression.value %}
46+
<p>This component is licensed under {{ about_object.license_expression.value }}</p>
47+
{% endif %}
48+
{% if about_object.copyright.value %}
49+
<pre>{{about_object.copyright.value}}</pre>
50+
{% endif %}
51+
{% if about_object.notice_file.value %}
52+
{% for notice in about_object.notice_file.value %}
53+
<pre class="component-notice">{{ about_object.notice_file.value[notice] }}</pre>
54+
{% endfor %}
55+
{% endif %}
56+
{% if about_object.license_key.value %}
57+
{% for license_key in about_object.license_key.value %}
58+
{% if license_key in common_licenses %}
59+
<p>Full text of <a class="{{ license_key }}" href="#component-license-{{ license_key }}"> {{ license_key }}</a> is available at the end of this document.</p>
60+
{% endif %}
61+
{% endfor %}
62+
{% if about_object.license_file.value %}
63+
{% for lic_file_name in about_object.license_file.value %}
64+
{% if not license_file_key_and_license_key[license_file_name_and_license_file_key[lic_file_name]] in common_licenses %}
65+
{% if about_object.license_file.value[lic_file_name] %}
66+
<pre>{{ about_object.license_file.value[lic_file_name] | e}}</pre>
67+
{% endif %}
68+
{% endif %}
69+
{% endfor %}
70+
{% endif %}
71+
{% else %}
72+
{% if about_object.license_file.value %}
73+
{% for lic_file_name in about_object.license_file.value %}
74+
{% if about_object.license_file.value[lic_file_name] %}
75+
<pre>{{ about_object.license_file.value[lic_file_name] | e}}</pre>
76+
{% endif %}
77+
{% endfor %}
78+
{% endif %}
79+
{% endif %}
80+
</div>
81+
{% endfor %}
82+
<hr/>
83+
<h3>Common Licenses Used in This Product</h3>
84+
{% for key in license_file_key_and_context %}
85+
{% if key in common_licenses %}
86+
<h3 id="component-license-{{ key }}">{{ key }}</h3>
87+
<pre>{{ license_file_key_and_context[key]|e }}</pre>
88+
{% endif %}
89+
{% endfor %}
90+
<h3><a id="End">End</a></h3>
91+
<i>This file was generated with AboutCode Toolkit version: {{ tkversion }} on: {{ utcnow }} (UTC)</i>
92+
</body>
11293
</html>
113-

0 commit comments

Comments
 (0)