Licenses: Difference between revisions
(Created initial content) |
m (Added code to load Javascript functions) |
||
Line 68: | Line 68: | ||
==Web interface to immediately [[Search|search]] for a given package and provide a list of licenses== | ==Web interface to immediately [[Search|search]] for a given package and provide a list of licenses== | ||
<html> | <html> | ||
<script src="/scripts/osadl.js"> | |||
</script> | |||
<h4>Look for other software packages that may have already been curated at <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> and provide links to the related licenses in use</h4> | <h4>Look for other software packages that may have already been curated at <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> and provide links to the related licenses in use</h4> | ||
Revision as of 23:09, 14 July 2023
Obtain licenses
Shell script
Use a shell script to encapsulate the search Web script in such a way that the licenses of a given package and optionally given version are extracted from the related SPDX tag:value files at the O Github repository:
#!/bin/bash if test -z "$1" then echo "Usage: $0 <package> <version>" exit 1 fi package="$1" version="$2" if test "$version" then package="$package/version-$version" fi wget -qO - https://www.osselot.org/licenses.php?$package
If the script is called "getlicenses" and invoked for the software package that was used as example on the search page as
getlicenses angular 15.2.2 | grep -v '^<'
the following list of licenses is returned:
Apache-2.0 Apache-2.0 AND 0BSD AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-Salesforce AND ISC AND MIT BSD-3-Clause CC-BY-4.0 MIT NOASSERTION Public-domain NOASSERTION
If the version number had been omitted, the licenses of all available versions would have been listed:
getlicenses angular | grep -v '^<' angular/version-15.1.0: Apache-2.0 Apache-2.0 AND 0BSD AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-Salesforce AND ISC AND MIT BSD-3-Clause CC-BY-4.0 MIT NOASSERTION Public-domain angular/version-15.2.2: Apache-2.0 Apache-2.0 AND 0BSD AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-Salesforce AND ISC AND MIT BSD-3-Clause CC-BY-4.0 MIT NOASSERTION Public-domain angular/version-16.0.1: Apache-2.0 Apache-2.0 AND 0BSD AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-Salesforce AND ISC AND MIT BSD-3-Clause CC-BY-4.0 MIT NOASSERTION Public-domain angular/version-16.1.2: Apache-2.0 Apache-2.0 AND 0BSD AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-Salesforce AND ISC AND MIT BSD-3-Clause CC-BY-4.0 MIT NOASSERTION Public-domain
Same as with the other Web scripts, the license URL can, of course, also be called directly in a browser such as https://www.osselot.org/licenses.php?angular.
Web interface to immediately search for a given package and provide a list of licenses
Look for other software packages that may have already been curated at O and provide links to the related licenses in use
A similar interface is provided that instead of the licenses the entire disclosure files of package versions are made available through links.