Skip to content

Commit

Permalink
๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ผ Update OSI Licenses (#1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 authored Dec 31, 2024
1 parent 18630fe commit 6f6032b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tricky-adults-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"myst-frontmatter": patch
---

OSI updates
44 changes: 44 additions & 0 deletions packages/myst-frontmatter/src/licenses/licenses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
'any-OSI': {
name: 'Any OSI License',
},
'any-OSI-perl-modules': {
name: 'Any OSI License - Perl Modules',
},
'Apache-1.0': {
name: 'Apache License 1.0',
free: true,
Expand Down Expand Up @@ -213,6 +216,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
'Boehm-GC': {
name: 'Boehm-Demers-Weiser GC License',
},
'Boehm-GC-without-fee': {
name: 'Boehm-Demers-Weiser GC License (without fee)',
},
Borceux: {
name: 'Borceux license',
},
Expand Down Expand Up @@ -575,6 +581,14 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
name: 'Creative Commons Public Domain Dedication and Certification',
CC: true,
},
'CC-PDM-1.0': {
name: 'Creative Commons Public Domain Mark 1.0 Universal',
CC: true,
},
'CC-SA-1.0': {
name: 'Creative Commons Share Alike 1.0 Generic',
CC: true,
},
'CC0-1.0': {
name: 'Creative Commons Zero v1.0 Universal',
free: true,
Expand Down Expand Up @@ -747,6 +761,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
'DocBook-Schema': {
name: 'DocBook Schema License',
},
'DocBook-Stylesheet': {
name: 'DocBook Stylesheet License',
},
'DocBook-XML': {
name: 'DocBook XML License',
},
Expand Down Expand Up @@ -891,6 +908,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
GD: {
name: 'GD License',
},
'generic-xts': {
name: 'Generic XTS License',
},
'GFDL-1.1-invariants-only': {
name: 'GNU Free Documentation License v1.1 only - invariants',
},
Expand Down Expand Up @@ -1137,6 +1157,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
'Inner-Net-2.0': {
name: 'Inner Net License v2.0',
},
InnoSetup: {
name: 'Inno Setup License',
},
Intel: {
name: 'Intel Open Source License',
osi: true,
Expand Down Expand Up @@ -1351,6 +1374,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
Minpack: {
name: 'Minpack License',
},
MIPS: {
name: 'MIPS License',
},
MirOS: {
name: 'The MirOS Licence',
osi: true,
Expand All @@ -1367,6 +1393,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
'MIT-advertising': {
name: 'Enlightenment License (e16)',
},
'MIT-Click': {
name: 'MIT Click License',
},
'MIT-CMU': {
name: 'CMU License',
},
Expand Down Expand Up @@ -1868,6 +1897,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
'Sendmail-8.23': {
name: 'Sendmail License 8.23',
},
'Sendmail-Open-Source-1.1': {
name: 'Sendmail Open Source License v1.1',
},
'SGI-B-1.0': {
name: 'SGI Free Software License B v1.0',
},
Expand Down Expand Up @@ -1910,6 +1942,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
osi: true,
free: true,
},
'SMAIL-GPL': {
name: 'SMAIL General Public License',
},
SMLNJ: {
name: 'Standard ML of New Jersey License',
free: true,
Expand Down Expand Up @@ -1994,6 +2029,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
'TGPPL-1.0': {
name: 'Transitive Grace Period Public Licence 1.0',
},
ThirdEye: {
name: 'ThirdEye License',
},
threeparttable: {
name: 'threeparttable License',
},
Expand All @@ -2012,6 +2050,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
'TPL-1.0': {
name: 'THOR Public License 1.0',
},
TrustedQSL: {
name: 'TrustedQSL License',
},
TTWL: {
name: 'Text-Tabs+Wrap License',
},
Expand Down Expand Up @@ -2110,6 +2151,9 @@ const licenses: Record<string, Omit<License, 'id' | 'url'>> = {
name: 'Do What The F*ck You Want To Public License',
free: true,
},
wwl: {
name: 'WWL License',
},
X11: {
name: 'X11 License',
free: true,
Expand Down
5 changes: 4 additions & 1 deletion packages/myst-frontmatter/src/licenses/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function correctLicense(license?: string): string | undefined {

function createURL(id: string, cc?: boolean, osi?: boolean): string {
if (cc) {
const match = /^([CBYSAND0ZEROPD-]+)(?:(?:-)([0-9].[0-9]))?(?:(?:-)([A-Z]{2,3}))?$/.exec(id);
const match = /^([CBYSAND0ZEROPDM-]+)(?:(?:-)([0-9].[0-9]))?(?:(?:-)([A-Z]{2,3}))?$/.exec(id);
if (!match) {
throw new Error('Creative Commons license not found');
}
Expand Down Expand Up @@ -57,6 +57,9 @@ function createURL(id: string, cc?: boolean, osi?: boolean): string {
case 'CC-PDDC':
link = '/publicdomain/';
break;
case 'CC-PDM':
link = '/publicdomain/mark/1.0/';
break;
default:
break;
}
Expand Down

0 comments on commit 6f6032b

Please sign in to comment.