Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add required phrase markers to CC license rules #3644

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dotarjun
Copy link

Fixes #3615

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @dotarjun
We have to make sure here the detection issue is fixed completely.
When you're fixing these issues do attach scan results here:
custom-content.html.txt.json
scancode -l --license-text --license-diagnostics --license-text-diagnostics --license-references --todo custom-content.html.txt --json-pp custom-content.html.txt.json

  1. Here we still have a cc-by-sa-4.0 detection which is incorrect, matched to https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-4.0_44.RULE so we have to add a required phrase there too.
    This is a process of adding a change (be it a new rule or adding a required phrase to an old rule), reindex with scancode-reindex-licenses and scan again to check that the detection issue is fixed and the results are correct.
  2. We can also improve the commit message and content. bug: add double curly braces -> Add required phrases to rules and add the lines:
Reference: https://github.com/nexB/scancode-toolkit/issues/3615
Reported-by: @camillem 

See also https://aboutcode.readthedocs.io/en/fix-rtd-pages/contributing/writing_good_commit_messages.html

@dotarjun
Copy link
Author

By following that command, I was running into this error:

❯ scancode -l --license-text --license-diagnostics --license-text-diagnostics --license-references --todo custom-content.html.txt  --json-pp custom-content.html.txt.json
Usage: scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <input>...
Try the 'scancode --help' option for help on options and arguments.

Error: Invalid value for '<OUTPUT FORMAT OPTION(s)> <input>...': Path 'custom-content.html.txt' does not exist.

image

So I ran this instead. This command did make some changes to custom-content.html.txt.json

scancode -l --license-text --license-diagnostics --license-text-diagnostics --license-references --todo custom-content.html.txt.json --json-pp custom-content.html.txt.json

But then I am unable to figure out what is going on.

For reference, I am using arch linux and my dev env is setup as per https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#installation-from-source-code-git-clone. I have it configured with --dev as well.

Concerning the git commit message,
I have read the page that you linked and will update it.

Reference: nexB#3615
Reported-by: @camillem

Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
@pombredanne
Copy link
Member

This is looking great!
Can I interest you in adding a small test too?
You could use the section of the file attached by @camillem in #3615 as a test file in this directory https://github.com/nexB/scancode-toolkit/tree/develop/tests/licensedcode/data/datadriven/lic4 with a companion YAML expected results?

@AyanSinhaMahapatra
Copy link
Member

AyanSinhaMahapatra commented Feb 12, 2024

@dotarjun

Error: Invalid value for '<OUTPUT FORMAT OPTION(s)> ...': Path 'custom-content.html.txt' does not exist.

That's because you don't have the file there.
You have to download the custom_content.html.txt mentioned here: #3615 (comment): https://github.com/nexB/scancode-toolkit/files/13529627/custom-content.html.txt

scancode ... custom-content.html.txt.json --json-pp custom-content.html.txt.json

By doing this you're scanning the result file and outputting the result there again, why would you want to do that?

Basically we want to reindex the licenses with your change here in the PR, then scan the test file again to see that there are no more similar bugs present for the same case (by scanning with the commands above, you will find another similar bug, and you have to add another required phrase to another rule to fix this). Or as @pombredanne mentioned above you can add a test and make sure the detections are correct, and there you'll se the issue.

And then:

  • Go to the branch you have for this PR
  • Make sure you do a reindex with scancode-reindex-licenses so your change in rule is reflected in the index
  • Now scan the linked above file

@dotarjun
Copy link
Author

Thank you for the guidance.

I totally missed it as I have my exams going on.

I'll do it tomorrow after my exam. Apologies for taking such a long time.

@dotarjun
Copy link
Author

{
  "headers": [
    {
      "tool_name": "scancode-toolkit",
      "tool_version": "32.0.8",
      "options": {
        "input": [
          "custom-content.html.txt"
        ],
        "--json-pp": "custom-content.html.txt.json",
        "--license": true,
        "--license-diagnostics": true,
        "--license-references": true,
        "--license-text": true,
        "--license-text-diagnostics": true,
        "--todo": true
      },
      "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
      "start_timestamp": "2024-02-19T011934.354644",
      "end_timestamp": "2024-02-19T011938.104192",
      "output_format_version": "3.1.0",
      "duration": 3.7495858669281006,
      "message": null,
      "errors": [],
      "warnings": [],
      "extra_data": {
        "system_environment": {
          "operating_system": "linux",
          "cpu_architecture": "64",
          "platform": "Linux-6.7.1-arch1-1-x86_64-with-glibc2.38",
          "platform_version": "#1 SMP PREEMPT_DYNAMIC Sun, 21 Jan 2024 22:14:10 +0000",
          "python_version": "3.11.6 (main, Nov 14 2023, 09:36:21) [GCC 13.2.1 20230801]"
        },
        "spdx_license_list_version": "3.22",
        "files_count": 1
      }
    }
  ],
  "license_detections": [
    {
      "identifier": "cc_by_sa_4_0_and_cc_by_sa_3_0-0626dcd2-0fd9-95cd-1c24-dbf7a0bf1b29",
      "license_expression": "cc-by-sa-4.0 AND cc-by-sa-3.0",
      "license_expression_spdx": "CC-BY-SA-4.0 AND CC-BY-SA-3.0",
      "detection_count": 1,
      "detection_log": [],
      "reference_matches": [
        {
          "license_expression": "cc-by-sa-4.0",
          "license_expression_spdx": "CC-BY-SA-4.0",
          "from_file": "custom-content.html.txt",
          "start_line": 76,
          "end_line": 76,
          "matcher": "3-seq",
          "score": 50.0,
          "matched_length": 11,
          "match_coverage": 50.0,
          "rule_relevance": 100,
          "rule_identifier": "cc-by-sa-4.0_44.RULE",
          "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-4.0_44.RULE",
          "matched_text": "and are licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.en\" title=\"Creative Commons Attribution-ShareAlike 3.0\">CC BY-SA 3.0</a> by the copyright holder.</p>",
          "matched_text_diagnostics": "licensed under <a href=\"[http]://creativecommons.org/licenses/by-sa/[3].[0]/[deed].[en]\" [title]=\"Creative Commons Attribution-ShareAlike"
        },
        {
          "license_expression": "cc-by-sa-3.0",
          "license_expression_spdx": "CC-BY-SA-3.0",
          "from_file": "custom-content.html.txt",
          "start_line": 76,
          "end_line": 76,
          "matcher": "2-aho",
          "score": 100.0,
          "matched_length": 6,
          "match_coverage": 100.0,
          "rule_relevance": 100,
          "rule_identifier": "cc-by-sa-3.0_57.RULE",
          "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-3.0_57.RULE",
          "matched_text": "and are licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.en\" title=\"Creative Commons Attribution-ShareAlike 3.0\">CC BY-SA 3.0</a> by the copyright holder.</p>",
          "matched_text_diagnostics": "Creative Commons Attribution-ShareAlike 3.0\">"
        },
        {
          "license_expression": "cc-by-sa-3.0",
          "license_expression_spdx": "CC-BY-SA-3.0",
          "from_file": "custom-content.html.txt",
          "start_line": 76,
          "end_line": 76,
          "matcher": "2-aho",
          "score": 50.0,
          "matched_length": 5,
          "match_coverage": 100.0,
          "rule_relevance": 50,
          "rule_identifier": "spdx_license_id_cc-by-sa-3.0_for_cc-by-sa-3.0.RULE",
          "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_cc-by-sa-3.0_for_cc-by-sa-3.0.RULE",
          "matched_text": "and are licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.en\" title=\"Creative Commons Attribution-ShareAlike 3.0\">CC BY-SA 3.0</a> by the copyright holder.</p>",
          "matched_text_diagnostics": "CC BY-SA 3.0</"
        }
      ]
    }
  ],
  "todo": [
    {
      "detection_id": "cc_by_sa_4_0_and_cc_by_sa_3_0-0626dcd2-0fd9-95cd-1c24-dbf7a0bf1b29",
      "review_comments": {
        "imperfect-match-coverage": "The license detection likely is not conclusive as there was license matches with low score or coverage, and so this needs review. scancode would likely benifit from a license rule addition from this case, so please report this to scancode-toolkit github issues."
      },
      "detection": {
        "license_expression": "cc-by-sa-4.0 AND cc-by-sa-3.0",
        "license_expression_spdx": "CC-BY-SA-4.0 AND CC-BY-SA-3.0",
        "matches": [
          {
            "license_expression": "cc-by-sa-4.0",
            "license_expression_spdx": "CC-BY-SA-4.0",
            "from_file": "custom-content.html.txt",
            "start_line": 76,
            "end_line": 76,
            "is_license_notice": true,
            "matcher": "3-seq",
            "score": 50.0,
            "matched_length": 11,
            "rule_length": 22,
            "match_coverage": 50.0,
            "rule_relevance": 100,
            "rule_identifier": "cc-by-sa-4.0_44.RULE",
            "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-4.0_44.RULE",
            "rule_notes": null,
            "referenced_filenames": [],
            "matched_text": "and are licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.en\" title=\"Creative Commons Attribution-ShareAlike 3.0\">CC BY-SA 3.0</a> by the copyright holder.</p>",
            "rule_text": "This work is licensed under a <a rel=\"license\" href=\"https://creativecommons.org/licenses/by-sa/4.0/\">\nCreative Commons Attribution-ShareAlike 4.0 International License</a>."
          },
          {
            "license_expression": "cc-by-sa-3.0",
            "license_expression_spdx": "CC-BY-SA-3.0",
            "from_file": "custom-content.html.txt",
            "start_line": 76,
            "end_line": 76,
            "is_license_reference": true,
            "matcher": "2-aho",
            "score": 100.0,
            "matched_length": 6,
            "rule_length": 6,
            "match_coverage": 100.0,
            "rule_relevance": 100,
            "rule_identifier": "cc-by-sa-3.0_57.RULE",
            "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-3.0_57.RULE",
            "rule_notes": null,
            "referenced_filenames": [],
            "matched_text": "and are licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.en\" title=\"Creative Commons Attribution-ShareAlike 3.0\">CC BY-SA 3.0</a> by the copyright holder.</p>",
            "rule_text": "Creative Commons Attribution-ShareAlike 3.0"
          },
          {
            "license_expression": "cc-by-sa-3.0",
            "license_expression_spdx": "CC-BY-SA-3.0",
            "from_file": "custom-content.html.txt",
            "start_line": 76,
            "end_line": 76,
            "is_license_reference": true,
            "is_continuous": true,
            "matcher": "2-aho",
            "score": 50.0,
            "matched_length": 5,
            "rule_length": 5,
            "match_coverage": 100.0,
            "rule_relevance": 50,
            "rule_identifier": "spdx_license_id_cc-by-sa-3.0_for_cc-by-sa-3.0.RULE",
            "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_cc-by-sa-3.0_for_cc-by-sa-3.0.RULE",
            "rule_notes": "Used to detect a bare SPDX license id",
            "referenced_filenames": [],
            "matched_text": "and are licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.en\" title=\"Creative Commons Attribution-ShareAlike 3.0\">CC BY-SA 3.0</a> by the copyright holder.</p>",
            "rule_text": "cc-by-sa-3.0"
          }
        ],
        "detection_log": [],
        "identifier": "cc_by_sa_4_0_and_cc_by_sa_3_0-0626dcd2-0fd9-95cd-1c24-dbf7a0bf1b29"
      }
    }
  ],
  "license_references": [
    {
      "key": "cc-by-sa-3.0",
      "language": "en",
      "short_name": "CC-BY-SA-3.0",
      "name": "Creative Commons Attribution Share Alike License 3.0",
      "category": "Copyleft Limited",
      "owner": "Creative Commons",
      "homepage_url": "http://creativecommons.org/licenses/by-sa/3.0/",
      "notes": null,
      "is_builtin": true,
      "is_exception": false,
      "is_unknown": false,
      "is_generic": false,
      "spdx_license_key": "CC-BY-SA-3.0",
      "other_spdx_license_keys": [],
      "osi_license_key": null,
      "text_urls": [
        "http://creativecommons.org/licenses/by-sa/3.0/legalcode"
      ],
      "osi_url": null,
      "faq_url": null,
      "other_urls": [
        "https://creativecommons.org/licenses/by-sa/3.0/legalcode"
      ],
      "key_aliases": [],
      "minimum_coverage": 30,
      "standard_notice": null,
      "ignorable_copyrights": [],
      "ignorable_holders": [],
      "ignorable_authors": [],
      "ignorable_urls": [
        "https://creativecommons.org/",
        "https://creativecommons.org/compatiblelicenses"
      ],
      "ignorable_emails": [],
      "text": "Creative Commons Legal Code\n\nAttribution-ShareAlike 3.0 Unported\n\n    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE\n    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN\n    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS\n    INFORMATION ON AN \"AS-IS\" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES\n    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR\n    DAMAGES RESULTING FROM ITS USE.\n\nLicense\n\nTHE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE\nCOMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS PROTECTED BY\nCOPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS\nAUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.\n\nBY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE\nTO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY\nBE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS\nCONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND\nCONDITIONS.\n\n1. Definitions\n\n a. \"Adaptation\" means a work based upon the Work, or upon the Work and\n    other pre-existing works, such as a translation, adaptation,\n    derivative work, arrangement of music or other alterations of a\n    literary or artistic work, or phonogram or performance and includes\n    cinematographic adaptations or any other form in which the Work may be\n    recast, transformed, or adapted including in any form recognizably\n    derived from the original, except that a work that constitutes a\n    Collection will not be considered an Adaptation for the purpose of\n    this License. For the avoidance of doubt, where the Work is a musical\n    work, performance or phonogram, the synchronization of the Work in\n    timed-relation with a moving image (\"synching\") will be considered an\n    Adaptation for the purpose of this License.\n b. \"Collection\" means a collection of literary or artistic works, such as\n    encyclopedias and anthologies, or performances, phonograms or\n    broadcasts, or other works or subject matter other than works listed\n    in Section 1(f) below, which, by reason of the selection and\n    arrangement of their contents, constitute intellectual creations, in\n    which the Work is included in its entirety in unmodified form along\n    with one or more other contributions, each constituting separate and\n    independent works in themselves, which together are assembled into a\n    collective whole. A work that constitutes a Collection will not be\n    considered an Adaptation (as defined below) for the purposes of this\n    License.\n c. \"Creative Commons Compatible License\" means a license that is listed\n    at https://creativecommons.org/compatiblelicenses that has been\n    approved by Creative Commons as being essentially equivalent to this\n    License, including, at a minimum, because that license: (i) contains\n    terms that have the same purpose, meaning and effect as the License\n    Elements of this License; and, (ii) explicitly permits the relicensing\n    of adaptations of works made available under that license under this\n    License or a Creative Commons jurisdiction license with the same\n    License Elements as this License.\n d. \"Distribute\" means to make available to the public the original and\n    copies of the Work or Adaptation, as appropriate, through sale or\n    other transfer of ownership.\n e. \"License Elements\" means the following high-level license attributes\n    as selected by Licensor and indicated in the title of this License:\n    Attribution, ShareAlike.\n f. \"Licensor\" means the individual, individuals, entity or entities that\n    offer(s) the Work under the terms of this License.\n g. \"Original Author\" means, in the case of a literary or artistic work,\n    the individual, individuals, entity or entities who created the Work\n    or if no individual or entity can be identified, the publisher; and in\n    addition (i) in the case of a performance the actors, singers,\n    musicians, dancers, and other persons who act, sing, deliver, declaim,\n    play in, interpret or otherwise perform literary or artistic works or\n    expressions of folklore; (ii) in the case of a phonogram the producer\n    being the person or legal entity who first fixes the sounds of a\n    performance or other sounds; and, (iii) in the case of broadcasts, the\n    organization that transmits the broadcast.\n h. \"Work\" means the literary and/or artistic work offered under the terms\n    of this License including without limitation any production in the\n    literary, scientific and artistic domain, whatever may be the mode or\n    form of its expression including digital form, such as a book,\n    pamphlet and other writing; a lecture, address, sermon or other work\n    of the same nature; a dramatic or dramatico-musical work; a\n    choreographic work or entertainment in dumb show; a musical\n    composition with or without words; a cinematographic work to which are\n    assimilated works expressed by a process analogous to cinematography;\n    a work of drawing, painting, architecture, sculpture, engraving or\n    lithography; a photographic work to which are assimilated works\n    expressed by a process analogous to photography; a work of applied\n    art; an illustration, map, plan, sketch or three-dimensional work\n    relative to geography, topography, architecture or science; a\n    performance; a broadcast; a phonogram; a compilation of data to the\n    extent it is protected as a copyrightable work; or a work performed by\n    a variety or circus performer to the extent it is not otherwise\n    considered a literary or artistic work.\n i. \"You\" means an individual or entity exercising rights under this\n    License who has not previously violated the terms of this License with\n    respect to the Work, or who has received express permission from the\n    Licensor to exercise rights under this License despite a previous\n    violation.\n j. \"Publicly Perform\" means to perform public recitations of the Work and\n    to communicate to the public those public recitations, by any means or\n    process, including by wire or wireless means or public digital\n    performances; to make available to the public Works in such a way that\n    members of the public may access these Works from a place and at a\n    place individually chosen by them; to perform the Work to the public\n    by any means or process and the communication to the public of the\n    performances of the Work, including by public digital performance; to\n    broadcast and rebroadcast the Work by any means including signs,\n    sounds or images.\n k. \"Reproduce\" means to make copies of the Work by any means including\n    without limitation by sound or visual recordings and the right of\n    fixation and reproducing fixations of the Work, including storage of a\n    protected performance or phonogram in digital form or other electronic\n    medium.\n\n2. Fair Dealing Rights. Nothing in this License is intended to reduce,\nlimit, or restrict any uses free from copyright or rights arising from\nlimitations or exceptions that are provided for in connection with the\ncopyright protection under copyright law or other applicable laws.\n\n3. License Grant. Subject to the terms and conditions of this License,\nLicensor hereby grants You a worldwide, royalty-free, non-exclusive,\nperpetual (for the duration of the applicable copyright) license to\nexercise the rights in the Work as stated below:\n\n a. to Reproduce the Work, to incorporate the Work into one or more\n    Collections, and to Reproduce the Work as incorporated in the\n    Collections;\n b. to create and Reproduce Adaptations provided that any such Adaptation,\n    including any translation in any medium, takes reasonable steps to\n    clearly label, demarcate or otherwise identify that changes were made\n    to the original Work. For example, a translation could be marked \"The\n    original work was translated from English to Spanish,\" or a\n    modification could indicate \"The original work has been modified.\";\n c. to Distribute and Publicly Perform the Work including as incorporated\n    in Collections; and,\n d. to Distribute and Publicly Perform Adaptations.\n e. For the avoidance of doubt:\n\n     i. Non-waivable Compulsory License Schemes. In those jurisdictions in\n        which the right to collect royalties through any statutory or\n        compulsory licensing scheme cannot be waived, the Licensor\n        reserves the exclusive right to collect such royalties for any\n        exercise by You of the rights granted under this License;\n    ii. Waivable Compulsory License Schemes. In those jurisdictions in\n        which the right to collect royalties through any statutory or\n        compulsory licensing scheme can be waived, the Licensor waives the\n        exclusive right to collect such royalties for any exercise by You\n        of the rights granted under this License; and,\n   iii. Voluntary License Schemes. The Licensor waives the right to\n        collect royalties, whether individually or, in the event that the\n        Licensor is a member of a collecting society that administers\n        voluntary licensing schemes, via that society, from any exercise\n        by You of the rights granted under this License.\n\nThe above rights may be exercised in all media and formats whether now\nknown or hereafter devised. The above rights include the right to make\nsuch modifications as are technically necessary to exercise the rights in\nother media and formats. Subject to Section 8(f), all rights not expressly\ngranted by Licensor are hereby reserved.\n\n4. Restrictions. The license granted in Section 3 above is expressly made\nsubject to and limited by the following restrictions:\n\n a. You may Distribute or Publicly Perform the Work only under the terms\n    of this License. You must include a copy of, or the Uniform Resource\n    Identifier (URI) for, this License with every copy of the Work You\n    Distribute or Publicly Perform. You may not offer or impose any terms\n    on the Work that restrict the terms of this License or the ability of\n    the recipient of the Work to exercise the rights granted to that\n    recipient under the terms of the License. You may not sublicense the\n    Work. You must keep intact all notices that refer to this License and\n    to the disclaimer of warranties with every copy of the Work You\n    Distribute or Publicly Perform. When You Distribute or Publicly\n    Perform the Work, You may not impose any effective technological\n    measures on the Work that restrict the ability of a recipient of the\n    Work from You to exercise the rights granted to that recipient under\n    the terms of the License. This Section 4(a) applies to the Work as\n    incorporated in a Collection, but this does not require the Collection\n    apart from the Work itself to be made subject to the terms of this\n    License. If You create a Collection, upon notice from any Licensor You\n    must, to the extent practicable, remove from the Collection any credit\n    as required by Section 4(c), as requested. If You create an\n    Adaptation, upon notice from any Licensor You must, to the extent\n    practicable, remove from the Adaptation any credit as required by\n    Section 4(c), as requested.\n b. You may Distribute or Publicly Perform an Adaptation only under the\n    terms of: (i) this License; (ii) a later version of this License with\n    the same License Elements as this License; (iii) a Creative Commons\n    jurisdiction license (either this or a later license version) that\n    contains the same License Elements as this License (e.g.,\n    Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible\n    License. If you license the Adaptation under one of the licenses\n    mentioned in (iv), you must comply with the terms of that license. If\n    you license the Adaptation under the terms of any of the licenses\n    mentioned in (i), (ii) or (iii) (the \"Applicable License\"), you must\n    comply with the terms of the Applicable License generally and the\n    following provisions: (I) You must include a copy of, or the URI for,\n    the Applicable License with every copy of each Adaptation You\n    Distribute or Publicly Perform; (II) You may not offer or impose any\n    terms on the Adaptation that restrict the terms of the Applicable\n    License or the ability of the recipient of the Adaptation to exercise\n    the rights granted to that recipient under the terms of the Applicable\n    License; (III) You must keep intact all notices that refer to the\n    Applicable License and to the disclaimer of warranties with every copy\n    of the Work as included in the Adaptation You Distribute or Publicly\n    Perform; (IV) when You Distribute or Publicly Perform the Adaptation,\n    You may not impose any effective technological measures on the\n    Adaptation that restrict the ability of a recipient of the Adaptation\n    from You to exercise the rights granted to that recipient under the\n    terms of the Applicable License. This Section 4(b) applies to the\n    Adaptation as incorporated in a Collection, but this does not require\n    the Collection apart from the Adaptation itself to be made subject to\n    the terms of the Applicable License.\n c. If You Distribute, or Publicly Perform the Work or any Adaptations or\n    Collections, You must, unless a request has been made pursuant to\n    Section 4(a), keep intact all copyright notices for the Work and\n    provide, reasonable to the medium or means You are utilizing: (i) the\n    name of the Original Author (or pseudonym, if applicable) if supplied,\n    and/or if the Original Author and/or Licensor designate another party\n    or parties (e.g., a sponsor institute, publishing entity, journal) for\n    attribution (\"Attribution Parties\") in Licensor's copyright notice,\n    terms of service or by other reasonable means, the name of such party\n    or parties; (ii) the title of the Work if supplied; (iii) to the\n    extent reasonably practicable, the URI, if any, that Licensor\n    specifies to be associated with the Work, unless such URI does not\n    refer to the copyright notice or licensing information for the Work;\n    and (iv) , consistent with Ssection 3(b), in the case of an\n    Adaptation, a credit identifying the use of the Work in the Adaptation\n    (e.g., \"French translation of the Work by Original Author,\" or\n    \"Screenplay based on original Work by Original Author\"). The credit\n    required by this Section 4(c) may be implemented in any reasonable\n    manner; provided, however, that in the case of a Adaptation or\n    Collection, at a minimum such credit will appear, if a credit for all\n    contributing authors of the Adaptation or Collection appears, then as\n    part of these credits and in a manner at least as prominent as the\n    credits for the other contributing authors. For the avoidance of\n    doubt, You may only use the credit required by this Section for the\n    purpose of attribution in the manner set out above and, by exercising\n    Your rights under this License, You may not implicitly or explicitly\n    assert or imply any connection with, sponsorship or endorsement by the\n    Original Author, Licensor and/or Attribution Parties, as appropriate,\n    of You or Your use of the Work, without the separate, express prior\n    written permission of the Original Author, Licensor and/or Attribution\n    Parties.\n d. Except as otherwise agreed in writing by the Licensor or as may be\n    otherwise permitted by applicable law, if You Reproduce, Distribute or\n    Publicly Perform the Work either by itself or as part of any\n    Adaptations or Collections, You must not distort, mutilate, modify or\n    take other derogatory action in relation to the Work which would be\n    prejudicial to the Original Author's honor or reputation. Licensor\n    agrees that in those jurisdictions (e.g. Japan), in which any exercise\n    of the right granted in Section 3(b) of this License (the right to\n    make Adaptations) would be deemed to be a distortion, mutilation,\n    modification or other derogatory action prejudicial to the Original\n    Author's honor and reputation, the Licensor will waive or not assert,\n    as appropriate, this Section, to the fullest extent permitted by the\n    applicable national law, to enable You to reasonably exercise Your\n    right under Section 3(b) of this License (right to make Adaptations)\n    but not otherwise.\n\n5. Representations, Warranties and Disclaimer\n\nUNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR\nOFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY\nKIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,\nINCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,\nFITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF\nLATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,\nWHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION\nOF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\n\n6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE\nLAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR\nANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES\nARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS\nBEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n7. Termination\n\n a. This License and the rights granted hereunder will terminate\n    automatically upon any breach by You of the terms of this License.\n    Individuals or entities who have received Adaptations or Collections\n    from You under this License, however, will not have their licenses\n    terminated provided such individuals or entities remain in full\n    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will\n    survive any termination of this License.\n b. Subject to the above terms and conditions, the license granted here is\n    perpetual (for the duration of the applicable copyright in the Work).\n    Notwithstanding the above, Licensor reserves the right to release the\n    Work under different license terms or to stop distributing the Work at\n    any time; provided, however that any such election will not serve to\n    withdraw this License (or any other license that has been, or is\n    required to be, granted under the terms of this License), and this\n    License will continue in full force and effect unless terminated as\n    stated above.\n\n8. Miscellaneous\n\n a. Each time You Distribute or Publicly Perform the Work or a Collection,\n    the Licensor offers to the recipient a license to the Work on the same\n    terms and conditions as the license granted to You under this License.\n b. Each time You Distribute or Publicly Perform an Adaptation, Licensor\n    offers to the recipient a license to the original Work on the same\n    terms and conditions as the license granted to You under this License.\n c. If any provision of this License is invalid or unenforceable under\n    applicable law, it shall not affect the validity or enforceability of\n    the remainder of the terms of this License, and without further action\n    by the parties to this agreement, such provision shall be reformed to\n    the minimum extent necessary to make such provision valid and\n    enforceable.\n d. No term or provision of this License shall be deemed waived and no\n    breach consented to unless such waiver or consent shall be in writing\n    and signed by the party to be charged with such waiver or consent.\n e. This License constitutes the entire agreement between the parties with\n    respect to the Work licensed here. There are no understandings,\n    agreements or representations with respect to the Work not specified\n    here. Licensor shall not be bound by any additional provisions that\n    may appear in any communication from You. This License may not be\n    modified without the mutual written agreement of the Licensor and You.\n f. The rights granted under, and the subject matter referenced, in this\n    License were drafted utilizing the terminology of the Berne Convention\n    for the Protection of Literary and Artistic Works (as amended on\n    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright\n    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996\n    and the Universal Copyright Convention (as revised on July 24, 1971).\n    These rights and subject matter take effect in the relevant\n    jurisdiction in which the License terms are sought to be enforced\n    according to the corresponding provisions of the implementation of\n    those treaty provisions in the applicable national law. If the\n    standard suite of rights granted under applicable copyright law\n    includes additional rights not granted under this License, such\n    additional rights are deemed to be included in the License; this\n    License is not intended to restrict the license of any rights under\n    applicable law.\n\n\nCreative Commons Notice\n\n    Creative Commons is not a party to this License, and makes no warranty\n    whatsoever in connection with the Work. Creative Commons will not be\n    liable to You or any party on any legal theory for any damages\n    whatsoever, including without limitation any general, special,\n    incidental or consequential damages arising in connection to this\n    license. Notwithstanding the foregoing two (2) sentences, if Creative\n    Commons has expressly identified itself as the Licensor hereunder, it\n    shall have all rights and obligations of Licensor.\n\n    Except for the limited purpose of indicating to the public that the\n    Work is licensed under the CCPL, Creative Commons does not authorize\n    the use by either party of the trademark \"Creative Commons\" or any\n    related trademark or logo of Creative Commons without the prior\n    written consent of Creative Commons. Any permitted use will be in\n    compliance with Creative Commons' then-current trademark usage\n    guidelines, as may be published on its website or otherwise made\n    available upon request from time to time. For the avoidance of doubt,\n    this trademark restriction does not form part of the License.\n\n    Creative Commons may be contacted at https://creativecommons.org/.",
      "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/cc-by-sa-3.0.LICENSE",
      "licensedb_url": "https://scancode-licensedb.aboutcode.org/cc-by-sa-3.0",
      "spdx_url": "https://spdx.org/licenses/CC-BY-SA-3.0"
    },
    {
      "key": "cc-by-sa-4.0",
      "language": "en",
      "short_name": "CC-BY-SA-4.0",
      "name": "Creative Commons Attribution-ShareAlike 4.0 International Public License",
      "category": "Copyleft Limited",
      "owner": "Creative Commons",
      "homepage_url": "http://creativecommons.org/licenses/by-sa/4.0/",
      "notes": null,
      "is_builtin": true,
      "is_exception": false,
      "is_unknown": false,
      "is_generic": false,
      "spdx_license_key": "CC-BY-SA-4.0",
      "other_spdx_license_keys": [],
      "osi_license_key": null,
      "text_urls": [
        "http://creativecommons.org/licenses/by-sa/4.0/legalcode"
      ],
      "osi_url": null,
      "faq_url": null,
      "other_urls": [
        "https://creativecommons.org/licenses/by-sa/4.0/legalcode"
      ],
      "key_aliases": [],
      "minimum_coverage": 0,
      "standard_notice": null,
      "ignorable_copyrights": [],
      "ignorable_holders": [],
      "ignorable_authors": [],
      "ignorable_urls": [],
      "ignorable_emails": [],
      "text": "Attribution-ShareAlike 4.0 International\n\n=======================================================================\n\nCreative Commons Corporation (\"Creative Commons\") is not a law firm and\ndoes not provide legal services or legal advice. Distribution of\nCreative Commons public licenses does not create a lawyer-client or\nother relationship. Creative Commons makes its licenses and related\ninformation available on an \"as-is\" basis. Creative Commons gives no\nwarranties regarding its licenses, any material licensed under their\nterms and conditions, or any related information. Creative Commons\ndisclaims all liability for damages resulting from their use to the\nfullest extent possible.\n\nUsing Creative Commons Public Licenses\n\nCreative Commons public licenses provide a standard set of terms and\nconditions that creators and other rights holders may use to share\noriginal works of authorship and other material subject to copyright\nand certain other rights specified in the public license below. The\nfollowing considerations are for informational purposes only, are not\nexhaustive, and do not form part of our licenses.\n\n     Considerations for licensors: Our public licenses are\n     intended for use by those authorized to give the public\n     permission to use material in ways otherwise restricted by\n     copyright and certain other rights. Our licenses are\n     irrevocable. Licensors should read and understand the terms\n     and conditions of the license they choose before applying it.\n     Licensors should also secure all rights necessary before\n     applying our licenses so that the public can reuse the\n     material as expected. Licensors should clearly mark any\n     material not subject to the license. This includes other CC-\n     licensed material, or material used under an exception or\n     limitation to copyright. More considerations for licensors:\n\twiki.creativecommons.org/Considerations_for_licensors\n\n     Considerations for the public: By using one of our public\n     licenses, a licensor grants the public permission to use the\n     licensed material under specified terms and conditions. If\n     the licensor's permission is not necessary for any reason--for\n     example, because of any applicable exception or limitation to\n     copyright--then that use is not regulated by the license. Our\n     licenses grant only permissions under copyright and certain\n     other rights that a licensor has authority to grant. Use of\n     the licensed material may still be restricted for other\n     reasons, including because others have copyright or other\n     rights in the material. A licensor may make special requests,\n     such as asking that all changes be marked or described.\n     Although not required by our licenses, you are encouraged to\n     respect those requests where reasonable. More considerations\n     for the public: \n\twiki.creativecommons.org/Considerations_for_licensees\n\n=======================================================================\n\nCreative Commons Attribution-ShareAlike 4.0 International Public\nLicense\n\nBy exercising the Licensed Rights (defined below), You accept and agree\nto be bound by the terms and conditions of this Creative Commons\nAttribution-ShareAlike 4.0 International Public License (\"Public\nLicense\"). To the extent this Public License may be interpreted as a\ncontract, You are granted the Licensed Rights in consideration of Your\nacceptance of these terms and conditions, and the Licensor grants You\nsuch rights in consideration of benefits the Licensor receives from\nmaking the Licensed Material available under these terms and\nconditions.\n\n\nSection 1 -- Definitions.\n\n  a. Adapted Material means material subject to Copyright and Similar\n     Rights that is derived from or based upon the Licensed Material\n     and in which the Licensed Material is translated, altered,\n     arranged, transformed, or otherwise modified in a manner requiring\n     permission under the Copyright and Similar Rights held by the\n     Licensor. For purposes of this Public License, where the Licensed\n     Material is a musical work, performance, or sound recording,\n     Adapted Material is always produced where the Licensed Material is\n     synched in timed relation with a moving image.\n\n  b. Adapter's License means the license You apply to Your Copyright\n     and Similar Rights in Your contributions to Adapted Material in\n     accordance with the terms and conditions of this Public License.\n\n  c. BY-SA Compatible License means a license listed at\n     creativecommons.org/compatiblelicenses, approved by Creative\n     Commons as essentially the equivalent of this Public License.\n\n  d. Copyright and Similar Rights means copyright and/or similar rights\n     closely related to copyright including, without limitation,\n     performance, broadcast, sound recording, and Sui Generis Database\n     Rights, without regard to how the rights are labeled or\n     categorized. For purposes of this Public License, the rights\n     specified in Section 2(b)(1)-(2) are not Copyright and Similar\n     Rights.\n\n  e. Effective Technological Measures means those measures that, in the\n     absence of proper authority, may not be circumvented under laws\n     fulfilling obligations under Article 11 of the WIPO Copyright\n     Treaty adopted on December 20, 1996, and/or similar international\n     agreements.\n\n  f. Exceptions and Limitations means fair use, fair dealing, and/or\n     any other exception or limitation to Copyright and Similar Rights\n     that applies to Your use of the Licensed Material.\n\n  g. License Elements means the license attributes listed in the name\n     of a Creative Commons Public License. The License Elements of this\n     Public License are Attribution and ShareAlike.\n\n  h. Licensed Material means the artistic or literary work, database,\n     or other material to which the Licensor applied this Public\n     License.\n\n  i. Licensed Rights means the rights granted to You subject to the\n     terms and conditions of this Public License, which are limited to\n     all Copyright and Similar Rights that apply to Your use of the\n     Licensed Material and that the Licensor has authority to license.\n\n  j. Licensor means the individual(s) or entity(ies) granting rights\n     under this Public License.\n\n  k. Share means to provide material to the public by any means or\n     process that requires permission under the Licensed Rights, such\n     as reproduction, public display, public performance, distribution,\n     dissemination, communication, or importation, and to make material\n     available to the public including in ways that members of the\n     public may access the material from a place and at a time\n     individually chosen by them.\n\n  l. Sui Generis Database Rights means rights other than copyright\n     resulting from Directive 96/9/EC of the European Parliament and of\n     the Council of 11 March 1996 on the legal protection of databases,\n     as amended and/or succeeded, as well as other essentially\n     equivalent rights anywhere in the world.\n\n  m. You means the individual or entity exercising the Licensed Rights\n     under this Public License. Your has a corresponding meaning.\n\n\nSection 2 -- Scope.\n\n  a. License grant.\n\n       1. Subject to the terms and conditions of this Public License,\n          the Licensor hereby grants You a worldwide, royalty-free,\n          non-sublicensable, non-exclusive, irrevocable license to\n          exercise the Licensed Rights in the Licensed Material to:\n\n            a. reproduce and Share the Licensed Material, in whole or\n               in part; and\n\n            b. produce, reproduce, and Share Adapted Material.\n\n       2. Exceptions and Limitations. For the avoidance of doubt, where\n          Exceptions and Limitations apply to Your use, this Public\n          License does not apply, and You do not need to comply with\n          its terms and conditions.\n\n       3. Term. The term of this Public License is specified in Section\n          6(a).\n\n       4. Media and formats; technical modifications allowed. The\n          Licensor authorizes You to exercise the Licensed Rights in\n          all media and formats whether now known or hereafter created,\n          and to make technical modifications necessary to do so. The\n          Licensor waives and/or agrees not to assert any right or\n          authority to forbid You from making technical modifications\n          necessary to exercise the Licensed Rights, including\n          technical modifications necessary to circumvent Effective\n          Technological Measures. For purposes of this Public License,\n          simply making modifications authorized by this Section 2(a)\n          (4) never produces Adapted Material.\n\n       5. Downstream recipients.\n\n            a. Offer from the Licensor -- Licensed Material. Every\n               recipient of the Licensed Material automatically\n               receives an offer from the Licensor to exercise the\n               Licensed Rights under the terms and conditions of this\n               Public License.\n\n            b. Additional offer from the Licensor -- Adapted Material.\n               Every recipient of Adapted Material from You\n               automatically receives an offer from the Licensor to\n               exercise the Licensed Rights in the Adapted Material\n               under the conditions of the Adapter's License You apply.\n\n            c. No downstream restrictions. You may not offer or impose\n               any additional or different terms or conditions on, or\n               apply any Effective Technological Measures to, the\n               Licensed Material if doing so restricts exercise of the\n               Licensed Rights by any recipient of the Licensed\n               Material.\n\n       6. No endorsement. Nothing in this Public License constitutes or\n          may be construed as permission to assert or imply that You\n          are, or that Your use of the Licensed Material is, connected\n          with, or sponsored, endorsed, or granted official status by,\n          the Licensor or others designated to receive attribution as\n          provided in Section 3(a)(1)(A)(i).\n\n  b. Other rights.\n\n       1. Moral rights, such as the right of integrity, are not\n          licensed under this Public License, nor are publicity,\n          privacy, and/or other similar personality rights; however, to\n          the extent possible, the Licensor waives and/or agrees not to\n          assert any such rights held by the Licensor to the limited\n          extent necessary to allow You to exercise the Licensed\n          Rights, but not otherwise.\n\n       2. Patent and trademark rights are not licensed under this\n          Public License.\n\n       3. To the extent possible, the Licensor waives any right to\n          collect royalties from You for the exercise of the Licensed\n          Rights, whether directly or through a collecting society\n          under any voluntary or waivable statutory or compulsory\n          licensing scheme. In all other cases the Licensor expressly\n          reserves any right to collect such royalties.\n\n\nSection 3 -- License Conditions.\n\nYour exercise of the Licensed Rights is expressly made subject to the\nfollowing conditions.\n\n  a. Attribution.\n\n       1. If You Share the Licensed Material (including in modified\n          form), You must:\n\n            a. retain the following if it is supplied by the Licensor\n               with the Licensed Material:\n\n                 i. identification of the creator(s) of the Licensed\n                    Material and any others designated to receive\n                    attribution, in any reasonable manner requested by\n                    the Licensor (including by pseudonym if\n                    designated);\n\n                ii. a copyright notice;\n\n               iii. a notice that refers to this Public License;\n\n                iv. a notice that refers to the disclaimer of\n                    warranties;\n\n                 v. a URI or hyperlink to the Licensed Material to the\n                    extent reasonably practicable;\n\n            b. indicate if You modified the Licensed Material and\n               retain an indication of any previous modifications; and\n\n            c. indicate the Licensed Material is licensed under this\n               Public License, and include the text of, or the URI or\n               hyperlink to, this Public License.\n\n       2. You may satisfy the conditions in Section 3(a)(1) in any\n          reasonable manner based on the medium, means, and context in\n          which You Share the Licensed Material. For example, it may be\n          reasonable to satisfy the conditions by providing a URI or\n          hyperlink to a resource that includes the required\n          information.\n\n       3. If requested by the Licensor, You must remove any of the\n          information required by Section 3(a)(1)(A) to the extent\n          reasonably practicable.\n\n  b. ShareAlike.\n\n     In addition to the conditions in Section 3(a), if You Share\n     Adapted Material You produce, the following conditions also apply.\n\n       1. The Adapter's License You apply must be a Creative Commons\n          license with the same License Elements, this version or\n          later, or a BY-SA Compatible License.\n\n       2. You must include the text of, or the URI or hyperlink to, the\n          Adapter's License You apply. You may satisfy this condition\n          in any reasonable manner based on the medium, means, and\n          context in which You Share Adapted Material.\n\n       3. You may not offer or impose any additional or different terms\n          or conditions on, or apply any Effective Technological\n          Measures to, Adapted Material that restrict exercise of the\n          rights granted under the Adapter's License You apply.\n\n\nSection 4 -- Sui Generis Database Rights.\n\nWhere the Licensed Rights include Sui Generis Database Rights that\napply to Your use of the Licensed Material:\n\n  a. for the avoidance of doubt, Section 2(a)(1) grants You the right\n     to extract, reuse, reproduce, and Share all or a substantial\n     portion of the contents of the database;\n\n  b. if You include all or a substantial portion of the database\n     contents in a database in which You have Sui Generis Database\n     Rights, then the database in which You have Sui Generis Database\n     Rights (but not its individual contents) is Adapted Material,\n\n     including for purposes of Section 3(b); and\n  c. You must comply with the conditions in Section 3(a) if You Share\n     all or a substantial portion of the contents of the database.\n\nFor the avoidance of doubt, this Section 4 supplements and does not\nreplace Your obligations under this Public License where the Licensed\nRights include other Copyright and Similar Rights.\n\n\nSection 5 -- Disclaimer of Warranties and Limitation of Liability.\n\n  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE\n     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS\n     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF\n     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,\n     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,\n     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR\n     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,\n     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT\n     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT\n     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.\n\n  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE\n     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,\n     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,\n     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,\n     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR\n     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN\n     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR\n     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR\n     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.\n\n  c. The disclaimer of warranties and limitation of liability provided\n     above shall be interpreted in a manner that, to the extent\n     possible, most closely approximates an absolute disclaimer and\n     waiver of all liability.\n\n\nSection 6 -- Term and Termination.\n\n  a. This Public License applies for the term of the Copyright and\n     Similar Rights licensed here. However, if You fail to comply with\n     this Public License, then Your rights under this Public License\n     terminate automatically.\n\n  b. Where Your right to use the Licensed Material has terminated under\n     Section 6(a), it reinstates:\n\n       1. automatically as of the date the violation is cured, provided\n          it is cured within 30 days of Your discovery of the\n          violation; or\n\n       2. upon express reinstatement by the Licensor.\n\n     For the avoidance of doubt, this Section 6(b) does not affect any\n     right the Licensor may have to seek remedies for Your violations\n     of this Public License.\n\n  c. For the avoidance of doubt, the Licensor may also offer the\n     Licensed Material under separate terms or conditions or stop\n     distributing the Licensed Material at any time; however, doing so\n     will not terminate this Public License.\n\n  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public\n     License.\n\n\nSection 7 -- Other Terms and Conditions.\n\n  a. The Licensor shall not be bound by any additional or different\n     terms or conditions communicated by You unless expressly agreed.\n\n  b. Any arrangements, understandings, or agreements regarding the\n     Licensed Material not stated herein are separate from and\n     independent of the terms and conditions of this Public License.\n\n\nSection 8 -- Interpretation.\n\n  a. For the avoidance of doubt, this Public License does not, and\n     shall not be interpreted to, reduce, limit, restrict, or impose\n     conditions on any use of the Licensed Material that could lawfully\n     be made without permission under this Public License.\n\n  b. To the extent possible, if any provision of this Public License is\n     deemed unenforceable, it shall be automatically reformed to the\n     minimum extent necessary to make it enforceable. If the provision\n     cannot be reformed, it shall be severed from this Public License\n     without affecting the enforceability of the remaining terms and\n     conditions.\n\n  c. No term or condition of this Public License will be waived and no\n     failure to comply consented to unless expressly agreed to by the\n     Licensor.\n\n  d. Nothing in this Public License constitutes or may be interpreted\n     as a limitation upon, or waiver of, any privileges and immunities\n     that apply to the Licensor or You, including from the legal\n     processes of any jurisdiction or authority.\n\n\n=======================================================================\n\nCreative Commons is not a party to its public\nlicenses. Notwithstanding, Creative Commons may elect to apply one of\nits public licenses to material it publishes and in those instances\nwill be considered the \u201cLicensor.\u201d The text of the Creative Commons\npublic licenses is dedicated to the public domain under the CC0 Public\nDomain Dedication. Except for the limited purpose of indicating that\nmaterial is shared under a Creative Commons public license or as\notherwise permitted by the Creative Commons policies published at\ncreativecommons.org/policies, Creative Commons does not authorize the\nuse of the trademark \"Creative Commons\" or any other trademark or logo\nof Creative Commons without its prior written consent including,\nwithout limitation, in connection with any unauthorized modifications\nto any of its public licenses or any other arrangements,\nunderstandings, or agreements concerning use of licensed material. For\nthe avoidance of doubt, this paragraph does not form part of the\npublic licenses.\n\nCreative Commons may be contacted at creativecommons.org.",
      "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/cc-by-sa-4.0.LICENSE",
      "licensedb_url": "https://scancode-licensedb.aboutcode.org/cc-by-sa-4.0",
      "spdx_url": "https://spdx.org/licenses/CC-BY-SA-4.0"
    }
  ],
  "license_rule_references": [
    {
      "license_expression": "cc-by-sa-3.0",
      "identifier": "cc-by-sa-3.0_57.RULE",
      "language": "en",
      "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-3.0_57.RULE",
      "is_license_text": false,
      "is_license_notice": false,
      "is_license_reference": true,
      "is_license_tag": false,
      "is_license_intro": false,
      "is_license_clue": false,
      "is_continuous": false,
      "is_builtin": true,
      "is_from_license": false,
      "is_synthetic": false,
      "length": 6,
      "relevance": 100,
      "minimum_coverage": 80,
      "referenced_filenames": [],
      "notes": null,
      "ignorable_copyrights": [],
      "ignorable_holders": [],
      "ignorable_authors": [],
      "ignorable_urls": [],
      "ignorable_emails": [],
      "text": "Creative Commons Attribution-ShareAlike 3.0"
    },
    {
      "license_expression": "cc-by-sa-4.0",
      "identifier": "cc-by-sa-4.0_44.RULE",
      "language": "en",
      "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-4.0_44.RULE",
      "is_license_text": false,
      "is_license_notice": true,
      "is_license_reference": false,
      "is_license_tag": false,
      "is_license_intro": false,
      "is_license_clue": false,
      "is_continuous": false,
      "is_builtin": true,
      "is_from_license": false,
      "is_synthetic": false,
      "length": 22,
      "relevance": 100,
      "minimum_coverage": 50,
      "referenced_filenames": [],
      "notes": null,
      "ignorable_copyrights": [],
      "ignorable_holders": [],
      "ignorable_authors": [],
      "ignorable_urls": [
        "https://creativecommons.org/licenses/by-sa/4.0/"
      ],
      "ignorable_emails": [],
      "text": "This work is licensed under a <a rel=\"license\" href=\"https://creativecommons.org/licenses/by-sa/4.0/\">\nCreative Commons Attribution-ShareAlike 4.0 International License</a>."
    },
    {
      "license_expression": "cc-by-sa-3.0",
      "identifier": "spdx_license_id_cc-by-sa-3.0_for_cc-by-sa-3.0.RULE",
      "language": "en",
      "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_cc-by-sa-3.0_for_cc-by-sa-3.0.RULE",
      "is_license_text": false,
      "is_license_notice": false,
      "is_license_reference": true,
      "is_license_tag": false,
      "is_license_intro": false,
      "is_license_clue": false,
      "is_continuous": true,
      "is_builtin": true,
      "is_from_license": false,
      "is_synthetic": false,
      "length": 5,
      "relevance": 50,
      "minimum_coverage": 100,
      "referenced_filenames": [],
      "notes": "Used to detect a bare SPDX license id",
      "ignorable_copyrights": [],
      "ignorable_holders": [],
      "ignorable_authors": [],
      "ignorable_urls": [],
      "ignorable_emails": [],
      "text": "cc-by-sa-3.0"
    }
  ],
  "files": [
    {
      "path": "custom-content.html.txt",
      "type": "file",
      "detected_license_expression": "cc-by-sa-4.0 AND cc-by-sa-3.0",
      "detected_license_expression_spdx": "CC-BY-SA-4.0 AND CC-BY-SA-3.0",
      "license_detections": [
        {
          "license_expression": "cc-by-sa-4.0 AND cc-by-sa-3.0",
          "license_expression_spdx": "CC-BY-SA-4.0 AND CC-BY-SA-3.0",
          "matches": [
            {
              "license_expression": "cc-by-sa-4.0",
              "spdx_license_expression": "CC-BY-SA-4.0",
              "from_file": "custom-content.html.txt",
              "start_line": 76,
              "end_line": 76,
              "matcher": "3-seq",
              "score": 50.0,
              "matched_length": 11,
              "match_coverage": 50.0,
              "rule_relevance": 100,
              "rule_identifier": "cc-by-sa-4.0_44.RULE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-4.0_44.RULE",
              "matched_text": "and are licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.en\" title=\"Creative Commons Attribution-ShareAlike 3.0\">CC BY-SA 3.0</a> by the copyright holder.</p>",
              "matched_text_diagnostics": "licensed under <a href=\"[http]://creativecommons.org/licenses/by-sa/[3].[0]/[deed].[en]\" [title]=\"Creative Commons Attribution-ShareAlike"
            },
            {
              "license_expression": "cc-by-sa-3.0",
              "spdx_license_expression": "CC-BY-SA-3.0",
              "from_file": "custom-content.html.txt",
              "start_line": 76,
              "end_line": 76,
              "matcher": "2-aho",
              "score": 100.0,
              "matched_length": 6,
              "match_coverage": 100.0,
              "rule_relevance": 100,
              "rule_identifier": "cc-by-sa-3.0_57.RULE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-sa-3.0_57.RULE",
              "matched_text": "and are licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.en\" title=\"Creative Commons Attribution-ShareAlike 3.0\">CC BY-SA 3.0</a> by the copyright holder.</p>",
              "matched_text_diagnostics": "Creative Commons Attribution-ShareAlike 3.0\">"
            },
            {
              "license_expression": "cc-by-sa-3.0",
              "spdx_license_expression": "CC-BY-SA-3.0",
              "from_file": "custom-content.html.txt",
              "start_line": 76,
              "end_line": 76,
              "matcher": "2-aho",
              "score": 50.0,
              "matched_length": 5,
              "match_coverage": 100.0,
              "rule_relevance": 50,
              "rule_identifier": "spdx_license_id_cc-by-sa-3.0_for_cc-by-sa-3.0.RULE",
              "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_cc-by-sa-3.0_for_cc-by-sa-3.0.RULE",
              "matched_text": "and are licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.en\" title=\"Creative Commons Attribution-ShareAlike 3.0\">CC BY-SA 3.0</a> by the copyright holder.</p>",
              "matched_text_diagnostics": "CC BY-SA 3.0</"
            }
          ],
          "detection_log": [],
          "identifier": "cc_by_sa_4_0_and_cc_by_sa_3_0-0626dcd2-0fd9-95cd-1c24-dbf7a0bf1b29"
        }
      ],
      "license_clues": [],
      "percentage_of_license_text": 5.83,
      "for_todo": [
        "cc_by_sa_4_0_and_cc_by_sa_3_0-0626dcd2-0fd9-95cd-1c24-dbf7a0bf1b29"
      ],
      "scan_errors": []
    }
  ]
}

I think cc-by-sa-4.0 should not be detected. Am I on the right track?

@AyanSinhaMahapatra
Copy link
Member

I think cc-by-sa-4.0 should not be detected. Am I on the right track?

Yes! Now we have to update cc-by-sa-4.0_44.RULE too similarly in the PR.

@dotarjun
Copy link
Author

dotarjun commented Feb 20, 2024

I've been trying to figure out how to do that but I can't understand why that is happening.

custom-content.html.txt.json

"matched_text_diagnostics": "licensed under <a href=\"[http]://creativecommons.org/licenses/by-sa/[3].[0]/[deed].[en]\" [title]=\"Creative Commons Attribution-ShareAlike"

This makes no sense as in cc-by-sa-4.0_44.RULE
There is no such matching text

---
license_expression: cc-by-sa-4.0
is_license_notice: yes
relevance: 100
ignorable_urls:
    - https://creativecommons.org/licenses/by-sa/4.0/
---

This work is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">
Creative Commons Attribution-ShareAlike 4.0 International License</a>.

Everything is correct in my eyes already

Signed-off-by: dotarjun <arjunsingh8112@gmail.com>
@pombredanne
Copy link
Member

You should add a test under tests/ IMHO

@pombredanne pombredanne changed the title bug: add double curly braces Add required phrase markers to CC license rules Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Got "CC-BY-NC-SA-3.0 AND CC-BY-SA-3.0" for file mentioning elements under CC-BY-SA-3.0
3 participants