Created
June 19, 2021 10:55
-
-
Save sritasngh/6590e3e560c895aba9a6b9f6e6c7656d to your computer and use it in GitHub Desktop.
This is a Jinja template for scancode to extract only required information for my project Integrating ScanCOde toolkit to FOSSology.
This file contains hidden or 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
{ | |
"licenses": | |
[ | |
{% if licenses %} | |
{% for key, license in licenses.items() %} | |
{ | |
"key": "{{ license.key }}", | |
"score": {{ license.score }}, | |
"name": "{{ license.name }}", | |
"text_url": "{{ license.text_url }}", | |
"start_line": {{ license.start_line }}, | |
"end_line": {{ license.end_line }}, | |
"matched_length": {{ license.matched_rule.matched_length }}, | |
"matched_text": {{ license.matched_text|tojson }} | |
} | |
{%if loop.nextitem and not loop.lastitem %},{% endif %} | |
{% endfor %} | |
{% endif %} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment