-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate-copyright: Render Node with rinja too.
- Loading branch information
1 parent
37ab090
commit 30ac7c9
Showing
4 changed files
with
115 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{% match self %} | ||
|
||
{% when Node::Root { children } %} | ||
|
||
{% for child in children %} | ||
{{ child|safe }} | ||
{% endfor %} | ||
|
||
{% when Node::Directory { name, children, license } %} | ||
|
||
<div style="border:1px solid black; padding: 5px;"> | ||
|
||
<p> | ||
<b>File/Directory:</b> <code>{{ name }}</code> | ||
</p> | ||
|
||
{% if let Some(license) = license %} | ||
|
||
<p><b>License:</b> {{ license.spdx }}</p> | ||
{% for copyright in license.copyright.iter() %} | ||
<p><b>Copyright:</b> {{ copyright }}</p> | ||
{% endfor %} | ||
|
||
{% endif %} | ||
|
||
{% if !children.is_empty() %} | ||
|
||
<p><b>Exceptions:</b></p> | ||
{% for child in children %} | ||
{{ child|safe }} | ||
{% endfor %} | ||
|
||
{% endif %} | ||
|
||
</div> | ||
|
||
{% when Node::File { name, license } %} | ||
|
||
<div style="border:1px solid black; padding: 5px;"> | ||
<p> | ||
<b>File/Directory:</b> <code>{{ name }}</code> | ||
</p> | ||
|
||
<p><b>License:</b> {{ license.spdx }}</p> | ||
{% for copyright in license.copyright.iter() %} | ||
<p><b>Copyright:</b> {{ copyright }}</p> | ||
{% endfor %} | ||
</div> | ||
|
||
{% when Node::Group { files, directories, license } %} | ||
|
||
<div style="border:1px solid black; padding: 5px;"> | ||
|
||
<p> | ||
<b>File/Directory:</b> | ||
{% for name in files %} | ||
<code>{{ name }}</code> | ||
{% endfor %} | ||
{% for name in directories %} | ||
<code>{{ name }}</code> | ||
{% endfor %} | ||
</p> | ||
|
||
<p><b>License:</b> {{ license.spdx }}</p> | ||
{% for copyright in license.copyright.iter() %} | ||
<p><b>Copyright:</b> {{ copyright }}</p> | ||
{% endfor %} | ||
|
||
</div> | ||
|
||
{% endmatch %} |