Licenses: Difference between revisions

From OSSelot
Jump to navigation Jump to search
mNo edit summary
(Added link to interface for DIY disclosure documents)
Line 80: Line 80:
==Interface to obtain entire disclosure documents==
==Interface to obtain entire disclosure documents==
A similar interface provides for retrieving the [[Disclosure_files|entire disclosure files]] of particular software packages and versions instead of the licenses in use.
A similar interface provides for retrieving the [[Disclosure_files|entire disclosure files]] of particular software packages and versions instead of the licenses in use.
==Interface to obtain individually designed do-it-yourself disclosure documents==
A similar interface provides for obtaining [[DIY_Disclosure_files|individually designed do-it-yourself disclosure files]] with various ways to show licenses and add optional features.

Revision as of 21:41, 6 October 2023

Obtain licenses

Shell script

Use a shell script to encapsulate the same search mechanism as used in the search Web script, but process the result further to extract the licenses of a given package and optionally given version 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 display the licenses that are used by a particular version



Interface to obtain entire disclosure documents

A similar interface provides for retrieving the entire disclosure files of particular software packages and versions instead of the licenses in use.

Interface to obtain individually designed do-it-yourself disclosure documents

A similar interface provides for obtaining individually designed do-it-yourself disclosure files with various ways to show licenses and add optional features.