parselicense

    Dark Mode
Search:
Group by:

  • Parse an Standard SPDX License from a plain-text string.

Examples:

import
  options, strutils

static :
  const
    wtfplTxt = """DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

Everyone is permitted to copy and distribute verbatim or modified copies of
this license document, and changing it is allowed as long as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

   0. You just DO WHAT THE FUCK YOU WANT TO.
"""
  doAssert parseLicense(wtfplTxt, default = Licenses.Mit) == Licenses.WTFPL
  doAssert parseLicense(wtfplTxt).get() == Licenses.WTFPL
  const
    zeroBsdTxt = """Copyright (C) 2006 by Rob Landley <rob@landley.net>

Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
"""
  doAssert parseLicense(zeroBsdTxt, default = Licenses.Mit) == Licenses.ZeroBSD
  doAssert parseLicense(zeroBsdTxt).get() == Licenses.ZeroBSD
  const
    fairTxt = """Fair License <Copyright Information>

Usage of the works is permitted provided that this instrument is retained
with the works, so that any entity that uses the works is notified of this
instrument.

DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
"""
  doAssert parseLicense(fairTxt, default = Licenses.Mit) == Licenses.Fair
  doAssert parseLicense(fairTxt).get() == Licenses.Fair
  const
    beerwareTxt = """"THE BEER-WARE LICENSE" (Revision 42):

<phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you can
do whatever you want with this stuff. If we meet some day, and you think this
stuff is worth it, you can buy me a beer in return Poul-Henning Kamp
"""
  doAssert parseLicense(beerwareTxt, default = Licenses.Mit) == Licenses.Beerware
  doAssert parseLicense(beerwareTxt).get() == Licenses.Beerware
  const
    curlTxt = """COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1996 - 2015, Daniel Stenberg,
<daniel@haxx.se>.

All rights reserved.

Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.
"""
  doAssert parseLicense(curlTxt, default = Licenses.Mit) == Licenses.Curl
  doAssert parseLicense(curlTxt).get() == Licenses.Curl
## Works with lowercased and uppercased Licenses.
const
  iscTxt = toLowerAscii("""ISC License Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")

Copyright (c) 1995-2003 by Internet Software Consortium

Permission to use, copy, modify, and /or distribute this software for any
purpose with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD
TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
""")
doAssert parseLicense(iscTxt, default = Licenses.Mit) == Licenses.Isc
doAssert parseLicense(iscTxt).get() == Licenses.Isc
## Works with invalid Data (Not a License).
doAssert parseLicense("Invalid data", default = Licenses.Mit) == Licenses.Mit
doAssert parseLicense("Invalid data").isNone()

Types

Licenses {...}{.pure.} = enum
  ZeroBSD = "86bc014f2dac5b3817d246b12a924575",
  AAL = "cd63bd7df532f9348e8334658be62ee1",
  ADSL = "31efac12530f58cd362da3077d4886bb",
  AFL11 = "3e0c12b81c16d13af346d7da797f2ee4",
  AFL12 = "35816e4e9b5272399c509a4e11ebef58",
  AFL20 = "c6473eb0a06066ee217cb63f4036e1e6",
  AFL21 = "6751550a2e9e2b8c09f5d444eb1e4336",
  AFL30 = "33bfe8ff9464edb4e80dd47883fde397",
  AGPL10Only = "3e1626d329c7b01fa7af64ea86d11f04",
  AGPL10OrLater = "3e1626d329c7b01fa7af64ea86d11f04",
  AGPL30Only = "be0e3161d6c16f3507e8a8ec722e18a5",
  AGPL30OrLater = "be0e3161d6c16f3507e8a8ec722e18a5",
  AMDPLPA = "c04a50b9741477a67c89232c56b6c7a7",
  AML = "655203b09a0e37833e5654f0ba1f9afa",
  AMPAS = "bb2e11fdfa1360dcfe426ede2866b5e0",
  ANTLRPD = "2e15e75ecff0cec0b9467e620480eabd",
  APAFML = "50de5e4dac5e807aec36d820f244c093",
  APL10 = "dc3739819ea77d932abad13732ae7cb3",
  APSL10 = "b1cce43bab4ad4b98322f7e909702d1b",
  APSL11 = "32722e3cf4a0b74324d6074bbb812a85",
  APSL12 = "e6a3c7653249103d1398e74f743805b1",
  APSL20 = "a3fccf74d7dba1e0a62354ada7224bce",
  Abstyles = "f321b0ffcc4fdc3f7a7e3c417e4ae046",
  Adobe2006 = "50dfecd5ddf537761abfcecd21733efe",
  AdobeGlyph = "c7b5cc35ba823643e94ee6dcde6692b4",
  Afmparse = "5f92c1008b1477d55a086036f6066223",
  Aladdin = "fdd2a4c244a86a6cc90abbcc0f6dd571",
  Apache10 = "7194ce08882a1955816f0a037529e532",
  Apache11 = "939670067807d6fd8c0769443ee0576d",
  Apache20 = "4eabd452962b05e470c4420a998f8c60",
  Artistic10Perl = "c22ad48927f47e79a613c61f2b8d42c7",
  Artistic10Cl8 = "b438a95bdae1f886ff5fd9b60a84e275",
  Artistic10 = "d84da9d9701d65281ffdeb76f338505e",
  Artistic20 = "af710270c98385676746837beb1bccfc",
  AutoconfException20 = "51026310fb394f681169f587d8fa8cae",
  AutoconfException30 = "6f82822ed8316be85581c1d066fb8060",
  BSD1Clause = "79606c3939ee59bfa9d2e3ae64a79945",
  BSD2ClauseFreeBSD = "3d4431d2194cfbbdbee817836e9faea9",
  BSD2ClauseNetBSD = "3d9c3ff95e0328267a2b10f30ff0140d",
  BSD2ClausePatent = "7cd98c72d0698c98a2292d1189617bc0",
  BSD2Clause = "794942d0bd765c4dc389d8cfb2d0703f",
  BSD3ClauseAttribution = "63426575fa258efe75665802846c1253",
  BSD3ClauseClear = "74727537a83775066114c244fd850b9e",
  BSD3ClauseLBNL = "629b8638910a34876663b4732cc4c857",
  BSD3ClauseNoNuclearLicense2014 = "d1009aed099fb5ac4c309e6fd132abb7",
  BSD3ClauseNoNuclearLicense = "9fb91f1e4d37eaba84764308ec3ff94b",
  BSD3ClauseNoNuclearWarranty = "94e3f367154935809bd9174acd0b4d72",
  BSD3ClauseOpenMPI = "b822335c2bef538715bc5791241b175b",
  BSD3Clause = "e254682f5286bde109d53f657561691f",
  BSD4ClauseUC = "5e681589c12a7710d74374aa26a9a123",
  BSD4Clause = "ac358f480c01ab3b2eaee9ea241c3094",
  BSDProtection = "fb0ec4188f17df7a2d2e51b8c8557a4b",
  BSDSourceCode = "40bea2057a26bb171754295a853c832f",
  BSL10 = "cd84568406dbee8348da90f16e130179",
  Bahyph = "8436f6b5848ea51a6324d5db9476bb03",
  Barr = "d846cec174fbd673cae53d2969885bde",
  Beerware = "86381bd116f4eaaf1fa750236c899bab",
  BisonException22 = "11f02df51979e0fb0efea91aaf65d1f1",
  BitTorrent10 = "bc46c0bedfce0c1659e6b0ba32ca293b",
  BitTorrent11 = "e532da5580c69273fe8bb31b5635a73f",
  BlueOak100 = "4f8a2a4a62b6e359e5545c3c191f7d93",
  BootloaderException = "c92a2ea4a3bac5610137322212aa24f2",
  Borceux = "7ec4217eef6948979c4395e3c6bfb6dd",
  CATOSL11 = "9281deebdee0a81d121ea1b3490737e9",
  CCBY10 = "cd2cfd56eaf7db9993a86415fb74bcff",
  CCBY20 = "85014a649499f47fd644cda212311c16",
  CCBY25 = "0d78f1566376231ccbc32469f0d939c9",
  CCBY30 = "369dedcc2e334565c712228f8e86ca36",
  CCBY40 = "b45615b8704b39f084ec2e53996613eb",
  CCBYNC10 = "8e9dbc6444dae8ace7e91773d3671d4f",
  CCBYNC20 = "26dd191121acdc6df19c17ab91b80fd5",
  CCBYNC25 = "79854f95841bea25ec71b9ec08a13cb6",
  CCBYNC30 = "7e0c644938d369001ebba7e38c073bae",
  CCBYNC40 = "591999a5bd69270aa41ee1aa496cb8ac",
  CCBYNCND10 = "0e42f773086cf8f731ba875034e4b77a",
  CCBYNCND20 = "a9cf1c5aec33a763dcf861aa6e2b0b91",
  CCBYNCND25 = "93502bcd41246efe506e05683ecc6691",
  CCBYNCND30 = "f27c786df72aa9b26889315fdb1407ca",
  CCBYNCND40 = "c96cad10463ada648d2c6a48adb9b886",
  CCBYNCSA10 = "6c5b5cec5ae0934e313019c3eeecc378",
  CCBYNCSA20 = "b238040070b9ba9e1892ff39f7b49b1d",
  CCBYNCSA25 = "309fd69c923e21179b1fbd252baa2002",
  CCBYNCSA30 = "45b662412a23388501471c30dbc77b12",
  CCBYNCSA40 = "a90f24c01c7fa68dd3478200333388c7",
  CCBYND10 = "264503e62d5adaf6daae1657bb11a081",
  CCBYND20 = "d7980c566775f65db295871113600cd2",
  CCBYND25 = "0a19f94caa871e69abe9266cc48fa471",
  CCBYND30 = "1c49686450746316cb1b73a0704f3756",
  CCBYND40 = "963862a5a3fc55d24b062db0bf1d421a",
  CCBYSA10 = "9832bfa1d74aad319b8cd94de9d46be5",
  CCBYSA20 = "aa8824db0b918e2ed92906bfecc75892",
  CCBYSA25 = "fa8586b1ba512a8c358bf32dbfe85a10",
  CCBYSA30 = "e1bff317a38fbfb1380e5143102ddc32",
  CCBYSA40 = "d686da5241c2f94541c355dfd56510d8",
  CCPDDC = "a14d5eea8fafb8976942391322042e2b",
  CC010 = "2a75d4202eac75cd4da14b91f1feaef8",
  CDDL10 = "8cf70c043360c6171cc6dd1c52749909",
  CDDL11 = "48445576781c49a0cc26d730c776d9ae",
  CDLAPermissive10 = "355cdc14110d2b4bc7f4953b9372e70e",
  CDLASharing10 = "96ee62e8b863fb9e628805985f8153fc",
  CECILL10 = "8412f7f220f6b9149c0a9f536b6db4ab",
  CECILL11 = "226de81fa585377679e276dc25e5ef92",
  CECILL20 = "f2c2183dfdc67bd5057eed599549a32e",
  CECILL21 = "3eb6dcdefe500bbd549101bfb01eb750",
  CECILLB = "42f5b3d4f72bef705dfb0dbbe8b70e2b",
  CECILLC = "a4b1e225aa7c82ecb9e600042808281b",
  CERNOHL11 = "b528fe6d379ceb3782aaa21b8e0287c0",
  CERNOHL12 = "814a19f1f4194ba666dd066b66563325",
  CLISPException20 = "298ba137f642cacb543647b824af492e",
  CNRIJython = "bceaa66f1f4b372c53e2acec5239621b",
  CNRIPythonGPLCompatible = "4fe4744154161308400dd1ae3d4282fb",
  CNRIPython = "5d19289063f622c62a5aeb5855ed557c",
  CPAL10 = "5b5cd5d26ab54933583f9246202ec5b2",
  CPL10 = "9c7539fd76f2939551e1c2e16d0fcd15",
  CPOL102 = "604c320f5ad72782cecb11aadb736bf2",
  CUAOPL10 = "1e372bb563af3a091b5c370a2cc477fe",
  Caldera = "39c767c09c07acb28681d499539dcbb0",
  ClArtistic = "462d2651594a6fb6ce3b257d94b57dd7",
  ClasspathException20 = "41c5ef284070cc238c583e7c7b7c40ba",
  Condor11 = "eec36cfe4bb32f1955f2aab729a62ccc",
  Crossword = "dbab515d4ad069169417ec1c65932756",
  CrystalStacker = "1e9bc74e8e5a7228ffc3783b16089039",
  Cube = "916feeaace79c2a3806b6196b8dac8c1",
  DFSL10 = "414d36fdc7f8004f2414c503b0c8821f",
  DOC = "f684f9737482c69a97eec6947473e9ac",
  DSDP = "a06dc9bd66380ec73fc4fcb941a65e68",
  DigiRuleFOSSException = "7813bc97e6ff60943c96991dd77776f2",
  Dotseqn = "51213f0614c8f2c3f0234bd6c87eb7fc",
  ECL10 = "8971541fec5ef57a22a8e4284ab7cb89",
  ECL20 = "75a0556258618892016710b6f77c820c",
  EFL10 = "5ebaabd079766baae445d791302b7586",
  EFL20 = "41ea43073b99e065351655220773eb91",
  EPL10 = "647dd7b1506650cdd3a1d57991dee638",
  EPL20 = "21ce96ab64870468b5c089b7e3b84460",
  EUDatagrid = "f090fa637de53a2b1858c567d112553e",
  EUPL10 = "502beb0080cbb70c60ff02e493f622b7",
  EUPL11 = "a4a76ee3d6cfdd77a0d7f03e099cc7e1",
  EUPL12 = "af9d8b41bc5e40cabd5dc3eca99244a8",
  Entessa = "4fa66c9afc6c4a89a2a7feaf339011e3",
  ErlPL11 = "67c91dd488e3e29fc2fa7e4f2067fe39",
  Eurosym = "6576c6dd13b529fe45c45ac32965dc6d",
  FLTKException = "08f8167ada38ddf06677fc60735224c8",
  FSFAP = "498c5c271c513ec1bb019e27d3008600",
  FSFUL = "ed23b7ae220459d9997635c2fbe244af",
  FSFULLR = "a369079645ad23e5f89d807158dddbe6",
  FTL = "51728c219d3be099a260ebd14e9a768f",
  Fair = "4ebb408b1454268b16ba3ee891eda21a",
  FawkesRuntimeException = "d81ffd343d36dfe6d35965db6f820703",
  FontException20 = "d7291a657b02ecae5e2196a470faf448",
  Frameworx10 = "7bb38c5f4b2d9bedf5c9a0751df3ba52",
  FreeImage = "09af9c950a393f6a69e6e712ec200217",
  GCCException20 = "e9ce4467d9e7ad63cd66baa579b1153c",
  GCCException31 = "0e6eb9958c265397e6871eea8e7cf757",
  GFDL11Only = "1b9b8e89b0fea6317f2e6b08e36380d8",
  GFDL11OrLater = "eae4e5d6570d998a5d8782486fe9e178",
  GFDL12Only = "56ab499d28cf6b91fc8f3d5bece26487",
  GFDL12OrLater = "c07e39c7aa34b620438ee26dac16ef69",
  GFDL13Only = "002c8a17ff284bd509d79651b91dba19",
  GFDL13OrLater = "0e6337c288fb210dfabdc333234ba66b",
  GL2PS = "58560df439c2fa7e338b91646ab1eafe",
  GPL10Only = "07d2a0c24e5ee3b48e1aaff2e0b4e445",
  GPL10OrLater = "12356bf696c61cd178cda63ab48d1f99",
  GPL20Only = "472a098ea64564adfef4e15ef070f9fe",
  GPL20OrLater = "6ad708e7ffb0ea062c3137faeefb1a49",
  GPL30LinkingException = "719a983245697ba0b5dc97e776386a1f",
  GPL30LinkingSourceException = "4adddb5176a6c9c2ddbb26b363138acd",
  GPL30Only = "b5e1b2d807066bc4ff989a707d846b97",
  GPL30OrLater = "b5e1b2d807066bc4ff989a707d846b97",
  GPLCC10 = "e8b611a1c3aac276eabfeb15018eae68",
  Giftware = "d292681123e90b3d34943e1a223bb84b",
  Glide = "366ac4b55d94481354c8ab7eccc3996b",
  Glulxe = "2fd2bc971de2e26eceaf76716a67ef1c",
  HPNDSellVariant = "6232226ff36a9027e73c533306b4cc19",
  HPND = "f96ea0d7840e6cf5bab61b59ef4bfacd",
  HaskellReport = "39c2de1c085764bd254c5f43549ca2b6",
  IBMPibs = "64f9d692ee16333c03a75c0124d05e75",
  ICU = "3a56b649a1cdd31e42fda0c1269f723c",
  IJG = "c4ead70fc268a5c3efea05d44b4d8f9a",
  IPA = "fac1f4fc181c77442a0110c931632c89",
  IPL10 = "90d6c62fe91910f630f1e8f2b2744554",
  ISC = "e5a9f1e484139ba11a783e1a90f2898f",
  ImageMagick = "9f12e385fd95a149bda8961abb004d0c",
  Imlib2 = "9a167c12c4dc20d5b1d3937c475301ca",
  InfoZIP = "d5b344529ff3cbfcaa465896ecc0054f",
  IntelACPI = "f9ada2a9b5b5c229ab64a59682415d87",
  Intel = "aad9869a59d100a753d45a9afad7f33e",
  Interbase10 = "284b46682694dd467a5408981e3d5330",
  JPNIC = "b6489d5ecb57629ad0a52f17a949fc06",
  JSON = "12d99d63135f542600fd5c70ac476090",
  JasPer20 = "ad7c385f0f0b2540be00d83cad124a0f",
  LAL12 = "14d2eab84422b809ac4ed50da5689e28",
  LAL13 = "a2586b95a000fc13de65d53811458293",
  LGPL20Only = "21f2e1667e830074983ab2c1f7b3ab94",
  LGPL20OrLater = "21f2e1667e830074983ab2c1f7b3ab94",
  LGPL21Only = "fab997ac0458fbb37ad7d5565a7f4f8c",
  LGPL21OrLater = "64edf0d1b1e231c6d61ca3f30b7a79d8",
  LGPL30Only = "084a72d4e088e971fcb6e6f41db5e1b9",
  LGPL30OrLater = "084a72d4e088e971fcb6e6f41db5e1b9",
  LGPLLR = "fc269b8d6be3d0e103edeac91d79c43c",
  LLVMException = "1bad0976f32d9572820e061a9c89f194",
  LPL10 = "89ff2b314816e5ca376eab2ce6b4fa19",
  LPL102 = "b22e36433f02cf3e4456490e62f6afeb",
  LPPL10 = "a3b852204c7e2154be0e2825fbad48b6",
  LPPL11 = "1ebb9711d7b8412f7c830f63fc6f084e",
  LPPL12 = "768d2db2a73b18d781da5772371d3cfd",
  LPPL13a = "fc4d647dda1b2d0ac91fae2fe586b151",
  LPPL13c = "df09a13235bbe08ccfbf2256c9af2e41",
  LZMAException = "1127893e7127df56043cc5adf107529b",
  Latex2e = "1fc5fb42b83c0cec54d790b6a1216d48",
  Leptonica = "3dbd4839c766e47b55812e29bcf0a446",
  LiLiQP11 = "8594ea58576ae1093c85030957137b86",
  LiLiQR11 = "d12ac115cfdd48942cac6c8b0d3cace5",
  LiLiQRplus11 = "56cf4511d717c75e277cea6d80f6c6c9",
  Libpng = "eeaa911b820540f7efd16df505644b25",
  LibtoolException = "6feabd4b10e9c3f5af7adb60b4499166",
  LinuxOpenIB = "8ef179ab237874e41d747fe4c41d562e",
  LinuxSyscallNote = "043398b0bf2a88ba7d014a2e8b8eecb7",
  MIT0 = "c0cd59c2299b47764dd0f1fdcd1f8d71",
  MITCMU = "7451053ac65868fd1d6b55b23c353572",
  MITAdvertising = "ab933dccb9217f063c9a47cbc84b8e6a",
  MITEnna = "d7951d093940b227a4d66e749dba201d",
  MITFeh = "fdbe9c8824d1f3e28d7f89783561b2ec",
  MIT = "b0b9062bd33d9f850d8a297d4d5d30ac",
  MITNFA = "e515d513a8e6101206be641a9d74282d",
  MPL10 = "65c6ebe773798043add6c97c16cfcee7",
  MPL11 = "75c1ad777f6dad0801d8650921678f2f",
  MPL20NoCopyleftException = "61283480d685c4276b30f5e5ae0ae3c7",
  MPL20 = "61283480d685c4276b30f5e5ae0ae3c7",
  MSPL = "48e9a9e5b2489eb129fe6c382ef2d6e9",
  MSRL = "337a4cf053ea3b3199d56c90d939664c",
  MTLL = "9a1627dfd8cb4819dbbd78287a75d667",
  MakeIndex = "aad3bdf68bc7df47e69bcfa9d9cf2292",
  MirOS = "3c0b54c44262d604cf12da5860c3c5c6",
  Motosoto = "7641f9950e8e1219cffe24446278b53c",
  MulanPSL10 = "c8d13a3fa095c08fcccdfac135bcda6f",
  Multics = "096ac3db6f1d7c18ea974ab1a7e5d2a1",
  Mup = "9a92ed2dd4bf3b6e20d6f7706241860d",
  NASA13 = "b768c677ca86b1b13ef6ec19e628e255",
  NBPL10 = "dc4c68097ea7a22eba54b03237900608",
  NCSA = "7b80d60dd3739cfd6766f918c95da2e2",
  NGPL = "6fb57645a28233683b51dba887465982",
  NLOD10 = "7f577a4c0af6212bb820de2cceaec6cf",
  NLPL = "823d8d155e826784e9d61a8b01162d03",
  NOSL = "5a9b1719be67566dd1e7ae445ab63120",
  NPL10 = "6339f26efe66be2e111c6a5d2ec86650",
  NPL11 = "05bfd07ba02dd90c228f01b631aacacd",
  NPOSL30 = "7ad78738b08b7df3fd1e429385f9a71e",
  NRL = "ce1c1b8e225cbe44c981ed7088acb874",
  NTP0 = "2a2993fac9266d48daeee1cb25823e01",
  NTP = "74cb93d0e5ef7de7e2b3aeece813f8d3",
  Naumen = "12351f5550f68c3626dd0c87002da3b1",
  NetSNMP = "2f402bcf3c53675d103c6eccea78972b",
  NetCDF = "8d11677b36c1f78a5b20d7a16bb7399a",
  Newsletr = "c5a3349031a180fc570ce0861ffe07cf",
  NokiaQtException11 = "57a53c5a07c5bac9b3b354251d292980",
  Nokia = "ee02b695b92a730b93e99f68cf6b3e3c",
  Noweb = "6401e288699450383d731042d9be8d72",
  OCCTPL = "9700184c3cea0e52dc8b1508a9c4bf4f",
  OCCTException10 = "41b7f873d549db0f67374abf5a5ae5a9",
  OCLC20 = "8a2f6533705ded4fb16746f4a0fa1075",
  OCamlLGPLLinkingException = "bac1204f25c2793e41c863bd81131973",
  ODCBy10 = "13d66efd671fde275185d20fe354662b",
  ODbL10 = "cc77cca8ec6da19fb7e250443172f752",
  OFL10RFN = "4c6ec4d52d32fe2cbcdecbd630fda5c5",
  OFL10NoRFN = "4c6ec4d52d32fe2cbcdecbd630fda5c5",
  OFL10 = "4c6ec4d52d32fe2cbcdecbd630fda5c5",
  OFL11RFN = "7b750b0d1cfdfd2f67ac82ce9da260db",
  OFL11NoRFN = "a50545ee90532bc8c63cf60328d5dfbe",
  OFL11 = "7b750b0d1cfdfd2f67ac82ce9da260db",
  OGLCanada20 = "5e24e90e8235d599317b55e30224ea3c",
  OGLUK10 = "9ca7e19b066b8f82daf9a22eda6b01c6",
  OGLUK20 = "85a0f70a5e0312855a233094ef562c6e",
  OGLUK30 = "38535ec2a4349d6bfd161a1c153e55ab",
  OGTSL = "460143592343e149e68bcd8fdfa4ffa5",
  OLDAP11 = "36b87777b94ad0ec02eda8648c46a410",
  OLDAP12 = "759a956e598a04c128540d2e6d4a98b9",
  OLDAP13 = "4072020d9a2a618e3a4c11d8e5519430",
  OLDAP14 = "84ce67f20d184355fd4fa024981efb9f",
  OLDAP201 = "51dc6f26ff2567310dbc8a50894b9f63",
  OLDAP20 = "ca9fb255a7f86a19136edd204cc7213f",
  OLDAP21 = "f2e582b5e2cb3fad8a5142e50083f8f0",
  OLDAP221 = "d7d7e510d2f27b6542d6b8a0ffdb3598",
  OLDAP222 = "52bf92a5777759c64bb7a5af52cf7685",
  OLDAP22 = "bf7e38bfa7ea2f3ebb9bd8d26ce8207b",
  OLDAP23 = "673d6fc332528d5db59b56370061e55a",
  OLDAP24 = "32ffc3a25769c7c682864daabef18919",
  OLDAP25 = "97bb9bd39d754d767609acea45ebba13",
  OLDAP26 = "6c270078249ff70bf711b5a7da52f5b9",
  OLDAP27 = "f3cc60730922128369e1f75381a07a15",
  OLDAP28 = "ef709b157bbfa86ba2f2f88115a58eb5",
  OML = "98fe290b746a3477e5d9e1cdfc1c926c",
  OPL10 = "c5bcdb239ccf7ced244091300878bc1f",
  OSETPL21 = "37a4fa191c58c12b4a81bd83665d4b70",
  OSL10 = "6dcb72f6d3c545b781e79b2717e752e7",
  OSL11 = "f730843ea7342174d1d0e1e17e44cf3f",
  OSL20 = "4085c3396aa88da61d857594f97ddb31",
  OSL21 = "0f19d05bc3074e7a4df6a399a4af2ad4",
  OSL30 = "7e8dcc3d1cd5ccd9e5fae87c5a5094da",
  OpenJDKAssemblyException10 = "91be1d42f7e3d27f0396fd6c7f0e7a8c",
  OpenSSL = "1ba055a8d09bd281593b927b13cc81b8",
  PDDL10 = "280968e5f31c2719f8386b82e5341854",
  PHP30 = "a899aaa1350c258d7489c3bb7ff8a82b",
  PHP301 = "283eeac32054426185fb753988bcf5d6",
  PSOrPDFFontException20170817 = "5b28ccf6a391b3d10dea2b6b6bb61e74",
  PSF20 = "f86428bfb7fbc44fae0068e2f9da2db9",
  Parity600 = "36b5fd1036b59595c1d670b1d34257f4",
  Parity700 = "5089adc52f0378dfef8a3c8f33d87903",
  Plexus = "16c2ebfd60c073e97dc6b713a8af7499",
  PostgreSQL = "be6620643e457ef6f0733ca1715a99d1",
  Python20 = "41c69da3ad87f10bc67be5ef3982168c",
  QPL10 = "b7a02e69e0f770d2798c342dc82d8e27",
  Qhull = "6ad8334b82e143f59985c15ffb2fe56b",
  QtGPLException10 = "8352fc6466f76d7314c73d3f403bbdaf",
  QtLGPLException11 = "86e3ffb64cd62b88c5787d4bf203d2db",
  QwtException10 = "ecb905fe52ef9325c43de7a4b9496740",
  RHeCos11 = "0b687413c8bc225083bbf767e4813949",
  RPL11 = "48422e152094aa5aefda657f8a825176",
  RPL15 = "92c950803d1accad8632a4cc88796791",
  RPSL10 = "4ab7c11d37a49f4e318b9adace187121",
  RSAMD = "162648b74250cdd570e30c0559087397",
  RSCPL = "9bd6d432bac456b6ac5796df7357d89c",
  Rdisc = "009cb0d8da5da9de461ffdcf65723adf",
  Ruby = "6793c8f16c6897bf862aa806265d5c5f",
  SAXPD = "d0eee90a21c7c9ff2969edf546e40a10",
  SCEA = "d216b2ef30014a8ca42a01da2638ca18",
  SGIB10 = "6d5a1384298f8eda59d4fcec2c6b8952",
  SGIB11 = "e0525c005ee2f624910649f58e463073",
  SGIB20 = "72d88b2e6859376b01747abef2c593e3",
  SHL05 = "fffe74d05be6d9e55fd603fc75de018e",
  SHL051 = "623a7a2544c1abd8f4180ef60c5b699a",
  SISSL12 = "9898c66b8a5f50589115a0c1e5ee82fd",
  SISSL = "a496988e38f4fdc7bed2ae3dfd73a10c",
  SMLNJ = "8a5e4cf4dc8835d88737a83ca0cae155",
  SMPPL = "c41f6de6da750bc275702b1e3cd3da4f",
  SNIA = "bfcff32ad8134f4bcb8aba3a23fa2cd5",
  SPL10 = "c870289b63b95a7cdb8ea65628f9b921",
  SSHOpenSSH = "aa05de7c491debb9fe90e226cf7b2a30",
  SSHShort = "b3c167b97b3310be944297228527f07a",
  SSPL10 = "16e56ac4d46fc2d65b0bdde83865f415",
  SWL = "eb1f7f98a07abe2c9d0492255f6d1f14",
  Saxpath = "aa55a1917a47f72ca7b67a2a67f95214",
  Sendmail823 = "cac58216577c1b3c0ce93ae0b00be329",
  Sendmail = "9b8f1018f2160e422cf1bd426f07d5d0",
  SimPL20 = "7d818f9b897f0f4f4ab2d2feffc5f122",
  Sleepycat = "c0424bb7e1e3d32c378e89f01b2da302",
  Spencer86 = "514109f7dce9e23cff56610a72e3850b",
  Spencer94 = "7fe745e1c647b05ef26eb66a72084400",
  Spencer99 = "3acec2576b96b56424c4bf69a5b5f14b",
  SugarCRM113 = "c3da0a8945ccdfebd28f6837da936ff8",
  SwiftException = "ad403770dd9706512de8fda79ee9537d",
  TAPROHL10 = "190258b070348521f2dcc35d31e010c8",
  TCL = "f2f6b1dfe230c0bb04c97b8d74e7b9c2",
  TCPWrappers = "d651a1391c3b13a92154e83b5a17a343",
  TMate = "83d91d632fea4fc6953df8d57bc856ce",
  TORQUE11 = "ed1b080c294ba392a08951988b3a720a",
  TOSL = "09e1a86545b1ec3b58bd7eba8d4f7a57",
  TUBerlin10 = "d222a43e4b9857df563a0c3444e21b26",
  TUBerlin20 = "be53a627d1a3ec7f78c880a5b046da2d",
  UCL10 = "939cb1cf7b30c612f3dcbe508d53a3bb",
  UPL10 = "7763d98e231a214fb9d69090848470a9",
  UnicodeDFS2015 = "5109c3172bf7e3837ad07c185c203621",
  UnicodeDFS2016 = "d7c408993f56fd7673d5eb194a543d19",
  UnicodeTOU = "add2461636653bafc9049603e1016a46",
  UniversalFOSSException10 = "fb6a71fe30bfb274ec4772026ed49dab",
  Unlicense = "a92285d4480cebeb0aaed0b356f87d81",
  VOSTROM = "36dfec64205b0bcd8be5a544cbd68f4b",
  VSL10 = "5b4dc405e32c51c28d711e7b2d52b3d5",
  Vim = "1291240bbad29dab2839c356054cc655",
  W3C19980720 = "ce982ea4702e501faecae6fa43762d8d",
  W3C20150513 = "7a7556ee29ee15d1ec19c9111a6cfcdc",
  W3C = "6b90c03393cb0ae74cac29ed238a1aad",
  WTFPL = "ca5b79ecea57bb39eab39a380b2f23b0",
  Watcom10 = "d23a2ba0371c8dbbe4c6adb600a8558b",
  Wsuipa = "03b1a8752813dc604a53fd64bbdea358",
  WxWindowsException31 = "fc2642c15f5ca8155bb5e774ffa3614a",
  X11 = "32b38ced13ca699996ada62a7b95a79c",
  XFree8611 = "42adf0fda067bfab2a2006c5ec3232bf",
  XSkat = "55787365167cc19f2f7240d762292522",
  Xerox = "7422407957a76acc6f42d8262c16bcd5",
  Xnet = "8cc419d4ea9381273a12e46c1a721e93",
  YPL10 = "6bc099a51d1b93a506e444fc6c7b3d29",
  YPL11 = "e5acf1d83a2d6581d22bc8f5140a4b98",
  ZPL11 = "fe0d5f8a28d765a4e2e4712550dc5081",
  ZPL20 = "bbd94ada1a5e91c654e4f81c25c3dcdb",
  ZPL21 = "90955fc04a511bd3199ca5d8c6bac7bf",
  Zed = "a166e6c16b58b7720c31808eaffc40a2",
  Zend20 = "6626c4184ca40f774c7a5a0fd9c204c4",
  Zimbra13 = "12f78d43e45df0e01c203a402ed7b2c5",
  Zimbra14 = "68310509535923c79b38bb08f9148837",
  Blessing = "5fe4f0f7c6fade4031741d9a5a036dc1",
  Bzip2105 = "181f4932c19614338924791a862de13b",
  Bzip2106 = "c91d9e346519e90c51d0fa4b68a614a1",
  CopyleftNext030 = "34ea78a6549495240a6a2114acc4a763",
  CopyleftNext031 = "bf1e26f4422a59a960b5f6681a6a46a2",
  Curl = "2e29425cb59911ba27f3dfc56ee13062",
  AGPL10 = "3e1626d329c7b01fa7af64ea86d11f04",
  AGPL30 = "be0e3161d6c16f3507e8a8ec722e18a5",
  GFDL11 = "1b9b8e89b0fea6317f2e6b08e36380d8",
  GFDL12 = "56ab499d28cf6b91fc8f3d5bece26487",
  GFDL13 = "002c8a17ff284bd509d79651b91dba19",
  GPL10 = "55f8b937fcb72a468893a666d6135d9c",
  GPL20WithGCCException = "60f5e3ae09d0298a785f767e24f62bef",
  GPL20WithAutoconfException = "d72c18908ad71d00100de46d962df2c8",
  GPL20WithBisonException = "427e56458b5af0d91a237dc845c7ff01",
  GPL20WithClasspathException = "3ab37f3cf25d75146eec171af8176139",
  GPL20WithFontException = "b18535171eab9dab3ecfa309719f4168",
  GPL20 = "2947d082a0487b1212ca7b4997c67e62",
  GPL30WithGCCException = "38a118f96470e5fd83a7b21d6700516c",
  GPL30WithAutoconfException = "b1f76f134438d4121f7a7aebbb8ad7e5",
  GPL30 = "b5e1b2d807066bc4ff989a707d846b97",
  LGPL20 = "21f2e1667e830074983ab2c1f7b3ab94",
  LGPL21 = "fab997ac0458fbb37ad7d5565a7f4f8c",
  LGPL30 = "084a72d4e088e971fcb6e6f41db5e1b9",
  Nunit = "32dbe632868db24bb2dcde6cc393b5e5",
  StandardMLNJ = "8a5e4cf4dc8835d88737a83ca0cae155",
  ECos20 = "58af11d659ac55ea43aafd783a077d3c",
  WxWindows = "4aca737984fc0bdb1551bcc087655a0f",
  Diffmark = "d57e60bc19725025e3a45fc0ab35cbf0",
  Dvipdfm = "f84976d69028c57b9cf0b4cdb6af1e3d",
  ECosException20 = "d2e42f1ff4bf1cb554ee6e03301a9a45",
  EGenix = "eb7d1ebd7ab1ac7802bf4d85c368efb4",
  Etalab20 = "8919e2797273a7bf1af9deb40ed84248",
  FreertosException20 = "370cf775ea4c44afb87843d74ca117c0",
  GSOAP13b = "9230301ff6edb30770e181a6a90c9d6c",
  GnuJavamailException = "b4dbd94bf4aa0e40c4b3ec129c1fa0ce",
  Gnuplot = "dde576d7e286f4d5060eb874fe5c5b91",
  I2pGplJavaException = "fc84f4828d9bae2bab75cb36a60b5a6d",
  IMatix = "aa848d60844011ba3595a39b3460484a",
  Libpng20 = "9075e67b17aa65790ede00913a57a666",
  Libselinux10 = "6de1d115054cf48a26c6362144c14d0a",
  Libtiff = "1b2bb740244127ea7bb2f5411217bfb7",
  MifException = "48e0132c38dd23c837c915c95830aa0a",
  Mpich2 = "a6218674e4359bed482aa1c70f5dab0b",
  OpenvpnOpensslException = "89633b4168551119cb62e72bc1021af9",
  Psfrag = "7ca79053d2e2e5770404489c882e5f2a",
  Psutils = "b5e179a386de025aceb568b059b00948",
  UBootException20 = "f9cd533ab8e5786a31aec213a1c30cc5",
  Xinetd = "e43529d6764111444a509e3247b56732",
  Xpp = "eff2123d259da3dc3ec9eae5ce01e072",
  Zlib = "f916a4a1c6ab66ad24f1b51f0674828e"
Standard SPDX Licenses. See https://github.com/spdx/license-list-data/blob/master/text/

Procs

proc parseLicense(licenseTxtContent: string; default: Licenses): Licenses {...}{.inline,
    raises: [], tags: [].}

Parse an Standard SPDX License from licenseTxtContent plain-text license, if can not be parsed returns default. Algorithm is as fast. Works at compile-time.

See also:

proc parseLicense(licenseTxtContent: string): Option[Licenses] {...}{.inline, raises: [],
    tags: [].}

Parse an Standard SPDX License from licenseTxtContent plain-text license, if can not be parsed returns none(Licenses). Algorithm is as fast. Works at compile-time.

See also:

Funcs

func `$`(license: Licenses): string {...}{.noinline, raises: [], tags: [].}
Return the human-friendly Standard name.