Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/licensedcode/license_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def generate_indexes(output_path, environment, licenses, test=False):
"other_spdx_license_keys": lic.other_spdx_license_keys,
"is_exception": lic.is_exception,
"is_deprecated": lic.is_deprecated,
"text": lic.text,
"json": f"{key}.json",
"yaml": f"{key}.yml",
"html": f"{key}.html",
Expand Down Expand Up @@ -140,6 +139,7 @@ def generate_details(output_path, environment, licenses, test=False):
license_details_template = environment.get_template("license_details.html")
for lic in licenses.values():
license_data = lic.to_dict(include_text=False, include_builtin=include_builtin)
license_data_with_text = lic.to_dict(include_text=True, include_builtin=include_builtin)
html = license_details_template.render(
**base_context_mapping,
license=lic,
Expand All @@ -149,12 +149,12 @@ def generate_details(output_path, environment, licenses, test=False):
write_file(
output_path,
f"{lic.key}.yml",
saneyaml.dump(license_data, indent=2)
saneyaml.dump(license_data_with_text, indent=2)
)
write_file(
output_path,
f"{lic.key}.json",
json.dumps(license_data, indent=2, sort_keys=False)
json.dumps(license_data_with_text, indent=2, sort_keys=False)
)
lic.dump(output_path)

Expand Down
12 changes: 0 additions & 12 deletions tests/licensedcode/data/license_db/index.json-expected.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
</p>
<p>Designed and built by <a href="https://www.nexb.com/" target="_blank">nexB</a>. Licensed under the <a href="cc-by-4.0.html">Creative Commons Attribution License 4.0 (CC-BY-4.0)</a>.</p>
<p>Generated with <a href="https://github.com/nexB/scancode-toolkit" target="_blank">ScanCode toolkit</a> 32.0.0b1 on Dec 22, 2022.</p>
<p>This is updated daily automatically with latest updates from the develop branch of scancode-toolkit, if any.</p>
</footer>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"spdx_license_key": "LicenseRef-scancode-bash-exception-gpl-2.0",
"text_urls": [
"https://git.savannah.gnu.org/cgit/bash.git/plain/COPYING?h=bash-3.0-rc1&id=dd9e6dfa23d0dae4888f11fb8c6a27bc36d1b283"
]
],
"text": "The Free Software Foundation has exempted Bash from the requirement of\nParagraph 2c of the General Public License. This is to say, there is\nno requirement for Bash to print a notice when it is started\ninteractively in the usual way. We made this exception because users\nand standards expect shells not to print such messages. This\nexception applies to any program that serves as a shell and that is\nbased primarily on Bash as opposed to other GNU software."
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ is_exception: yes
spdx_license_key: LicenseRef-scancode-bash-exception-gpl-2.0
text_urls:
- https://git.savannah.gnu.org/cgit/bash.git/plain/COPYING?h=bash-3.0-rc1&id=dd9e6dfa23d0dae4888f11fb8c6a27bc36d1b283
text: |
The Free Software Foundation has exempted Bash from the requirement of
Paragraph 2c of the General Public License. This is to say, there is
no requirement for Bash to print a notice when it is started
interactively in the usual way. We made this exception because users
and standards expect shells not to print such messages. This
exception applies to any program that serves as a shell and that is
based primarily on Bash as opposed to other GNU software.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
</p>
<p>Designed and built by <a href="https://www.nexb.com/" target="_blank">nexB</a>. Licensed under the <a href="cc-by-4.0.html">Creative Commons Attribution License 4.0 (CC-BY-4.0)</a>.</p>
<p>Generated with <a href="https://github.com/nexB/scancode-toolkit" target="_blank">ScanCode toolkit</a> 32.0.0b1 on Dec 22, 2022.</p>
<p>This is updated daily automatically with latest updates from the develop branch of scancode-toolkit, if any.</p>
</footer>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"category": "Proprietary Free",
"owner": "Unspecified",
"homepage_url": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/",
"spdx_license_key": "LicenseRef-scancode-binary-linux-firmware"
"spdx_license_key": "LicenseRef-scancode-binary-linux-firmware",
"text": "Redistribution. Redistribution and use in binary form, without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions must reproduce the above copyright notice and the\nfollowing disclaimer in the documentation and/or other materials\nprovided with the distribution.\n\n* Neither the name of the Copyright Holder nor the names of its\nsuppliers may be used to endorse or promote products derived from this\nsoftware without specific prior written permission.\n\n* No reverse engineering, decompilation, or disassembly of this software\nis permitted.\n\nDISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND\nCONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\nCOPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\nNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\nUSE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,30 @@ category: Proprietary Free
owner: Unspecified
homepage_url: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/
spdx_license_key: LicenseRef-scancode-binary-linux-firmware
text: |
Redistribution. Redistribution and use in binary form, without
modification, are permitted provided that the following conditions are
met:

* Redistributions must reproduce the above copyright notice and the
following disclaimer in the documentation and/or other materials
provided with the distribution.

* Neither the name of the Copyright Holder nor the names of its
suppliers may be used to endorse or promote products derived from this
software without specific prior written permission.

* No reverse engineering, decompilation, or disassembly of this software
is permitted.

DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
</p>
<p>Designed and built by <a href="https://www.nexb.com/" target="_blank">nexB</a>. Licensed under the <a href="cc-by-4.0.html">Creative Commons Attribution License 4.0 (CC-BY-4.0)</a>.</p>
<p>Generated with <a href="https://github.com/nexB/scancode-toolkit" target="_blank">ScanCode toolkit</a> 32.0.0b1 on Dec 22, 2022.</p>
<p>This is updated daily automatically with latest updates from the develop branch of scancode-toolkit, if any.</p>
</footer>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"is_exception": true,
"spdx_license_key": "LicenseRef-scancode-bison-exception-2.0",
"faq_url": "http://www.gnu.org/software/bison/manual/bison.html#Conditions",
"standard_notice": "This library is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2, or (at your option) any later\nversion.\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\nYou should have received a copy of the GNU General Public License along\nwith this library; see the file COPYING. If not, write to the Free Software\nFoundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\nAs a special exception, when this file is copied by Bison into a Bison\noutput file, you may use that output file without restriction. This special\nexception was added by the Free Software Foundation in version 1.24 of\nBison.\n"
"standard_notice": "This library is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2, or (at your option) any later\nversion.\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\nYou should have received a copy of the GNU General Public License along\nwith this library; see the file COPYING. If not, write to the Free Software\nFoundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\nAs a special exception, when this file is copied by Bison into a Bison\noutput file, you may use that output file without restriction. This special\nexception was added by the Free Software Foundation in version 1.24 of\nBison.\n",
"text": "As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison."
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ standard_notice: |
output file, you may use that output file without restriction. This special
exception was added by the Free Software Foundation in version 1.24 of
Bison.
text: As a special exception, when this file is copied by Bison into a Bison output file, you
may use that output file without restriction. This special exception was added by the Free
Software Foundation in version 1.24 of Bison.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
</p>
<p>Designed and built by <a href="https://www.nexb.com/" target="_blank">nexB</a>. Licensed under the <a href="cc-by-4.0.html">Creative Commons Attribution License 4.0 (CC-BY-4.0)</a>.</p>
<p>Generated with <a href="https://github.com/nexB/scancode-toolkit" target="_blank">ScanCode toolkit</a> 32.0.0b1 on Dec 22, 2022.</p>
<p>This is updated daily automatically with latest updates from the develop branch of scancode-toolkit, if any.</p>
</footer>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"other_urls": [
"http://git.savannah.gnu.org/cgit/bison.git/tree/data/yacc.c?id=193d7c7054ba7197b0789e14965b739162319b5e#n141"
],
"standard_notice": "This program is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2, or (at your option) any later\nversion.\nThis program is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\nYou should have received a copy of the GNU General Public License along\nwith this program; if not, write to the\nFree Software Foundation, Inc.,\n51 Franklin Street, Fifth Floor,\nBoston, MA 02110-1301, USA.\nAs a special exception, you may create a larger work that contains part or\nall of the Bison parser skeleton and distribute that work under terms of\nyour choice, so long as that work isn't itself a parser generator using the\nskeleton or a modified version thereof as a parser skeleton. Alternatively,\nif you modify or redistribute the parser skeleton itself, you may (at your\noption) remove this special exception, which will cause the skeleton and\nthe resulting Bison output files to be licensed under the GNU General\nPublic License without this special exception.\nThis special exception was added by the Free Software Foundation in version\n2.2 of Bison.\n"
"standard_notice": "This program is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 2, or (at your option) any later\nversion.\nThis program is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\nYou should have received a copy of the GNU General Public License along\nwith this program; if not, write to the\nFree Software Foundation, Inc.,\n51 Franklin Street, Fifth Floor,\nBoston, MA 02110-1301, USA.\nAs a special exception, you may create a larger work that contains part or\nall of the Bison parser skeleton and distribute that work under terms of\nyour choice, so long as that work isn't itself a parser generator using the\nskeleton or a modified version thereof as a parser skeleton. Alternatively,\nif you modify or redistribute the parser skeleton itself, you may (at your\noption) remove this special exception, which will cause the skeleton and\nthe resulting Bison output files to be licensed under the GNU General\nPublic License without this special exception.\nThis special exception was added by the Free Software Foundation in version\n2.2 of Bison.\n",
"text": "As a special exception, you may create a larger work that contains part or all\nof the Bison parser skeleton and distribute that work under terms of your\nchoice, so long as that work isn't itself a parser generator using the skeleton\nor a modified version thereof as a parser skeleton. Alternatively, if you\nmodify or redistribute the parser skeleton itself, you may (at your option)\nremove this special exception, which will cause the skeleton and the resulting\nBison output files to be licensed under the GNU General Public License without\nthis special exception.\n\nThis special exception was added by the Free Software Foundation in version 2.2\nof Bison."
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,15 @@ standard_notice: |
Public License without this special exception.
This special exception was added by the Free Software Foundation in version
2.2 of Bison.
text: |
As a special exception, you may create a larger work that contains part or all
of the Bison parser skeleton and distribute that work under terms of your
choice, so long as that work isn't itself a parser generator using the skeleton
or a modified version thereof as a parser skeleton. Alternatively, if you
modify or redistribute the parser skeleton itself, you may (at your option)
remove this special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public License without
this special exception.

This special exception was added by the Free Software Foundation in version 2.2
of Bison.
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@
</p>
<p>Designed and built by <a href="https://www.nexb.com/" target="_blank">nexB</a>. Licensed under the <a href="cc-by-4.0.html">Creative Commons Attribution License 4.0 (CC-BY-4.0)</a>.</p>
<p>Generated with <a href="https://github.com/nexB/scancode-toolkit" target="_blank">ScanCode toolkit</a> 32.0.0b1 on Dec 22, 2022.</p>
<p>This is updated daily automatically with latest updates from the develop branch of scancode-toolkit, if any.</p>
</footer>
</div>

Expand Down

Large diffs are not rendered by default.

Loading