- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 120
An app to detect licenses from the provided input license text #450
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
          
     Draft
      
      
            lf32
  wants to merge
  79
  commits into
  main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
lf32-licensetext-devel
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +1,930
        
        
          −0
        
        
          
        
      
    
  
  
     Draft
                    Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            79 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      0a4915a
              
                create an app to detect licenses from input text
              
              
                lf32 d5c4018
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 4c1483a
              
                Merge branch 'main' of nexB/scancode.io into lf32-licensetext-devel
              
              
                lf32 9c25575
              
                Improved UI, Changed Scan Path
              
              
                lf32 49fe7a5
              
                changed card title from name to short_name
              
              
                lf32 cb9de2d
              
                Improved License Input and Details UI #450
              
              
                lf32 d2bd8d0
              
                Run License Detection On Text Submission with tempfile #450
              
              
                lf32 a113c14
              
                Rename license form, prevent text stripping, temp_file attr update #450
              
              
                lf32 0fa7fbb
              
                Detect unknown licenses and return matched text by default #450
              
              
                lf32 ea6f4bb
              
                Flush contents of the temfile before passing as an argument #450
              
              
                lf32 947faaf
              
                Flush contents of the tempfile before passing as an argument #450
              
              
                lf32 dd62121
              
                Merge branch 'lf32-licensetext-devel' of https://github.com/nexB/scan…
              
              
                lf32 60af913
              
                Deleted models.py and migrations #450
              
              
                lf32 28d0dcf
              
                Added comment related to flushing tempfile #450
              
              
                lf32 e46107a
              
                Commenting inside views with pound over docstring #450
              
              
                lf32 4468085
              
                Write comments in multiple lines inside views #450
              
              
                lf32 8e7c72b
              
                Input text is rendered inside the box over the textarea #450
              
              
                lf32 a87ace7
              
                Merge branch 'main' of https://github.com/nexB/scancode.io into lf32-…
              
              
                lf32 91ca751
              
                Display form errors, detect licenses for input text file #450
              
              
                lf32 cfb7a37
              
                Improve file error response in views #450
              
              
                lf32 7eedf84
              
                Moved license summary to details with  new UI #450
              
              
                lf32 2d4f7f6
              
                Fixed broken short lines #450
              
              
                lf32 bbe58d0
              
                New line at the end of the page #450
              
              
                lf32 5602a6e
              
                Merge branch 'main' of nexB/scancode.io -> lf32-licensetext-devel
              
              
                lf32 a19a762
              
                Ace Editor Restored with improved UI #450
              
              
                lf32 b77976d
              
                Highlight and scroll down to matched text #450
              
              
                lf32 0333932
              
                Close all cards while opening a new one #450
              
              
                lf32 b206145
              
                Removed details option in the view #450
              
              
                lf32 b53e45c
              
                Restore details tab with matched text #450
              
              
                lf32 fe66aa2
              
                Merge remote-tracking branch 'origin' into lf32-licensetext-devel
              
              
                lf32 ce9b294
              
                Merge remote-tracking branch 'origin' into lf32-licensetext-devel
              
              
                lf32 1293066
              
                Highlight text with colors #450
              
              
                lf32 dddb4ad
              
                Merge branch 'main' of https://github.com/nexB/scancode.io into lf32-…
              
              
                lf32 a6b34de
              
                Fix failing text for `make valid` #450
              
              
                lf32 1bdf9d1
              
                Fix failing test for `make valid` #450
              
              
                lf32 ab56010
              
                Merge branch 'main' of into lf32-licensetext-devel
              
              
                lf32 fda2356
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 b82d1a2
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 67462c5
              
                Testing out new UI to match the projects page #450
              
              
                lf32 0f675ff
              
                Add match_text tests to scantext #450
              
              
                lf32 76e8a03
              
                Make scancode match text test pass
              
              
                pombredanne 8727cb7
              
                Add list of matches to Token
              
              
                pombredanne 04b8d21
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 3f7b640
              
                Add all detected values into the table #450
              
              
                lf32 658df1f
              
                Add details page to view matched license details #450
              
              
                lf32 8edf207
              
                Add a mini licenses file to test for development #450
              
              
                lf32 787133a
              
                Move import of Token to top #450
              
              
                lf32 4a08ea9
              
                Add `license_chart_data` to render charts #450
              
              
                lf32 32c3931
              
                Add eye friendly green color to match highlights #450
              
              
                lf32 4442f7c
              
                Highlight all detected licenses in one match #450
              
              
                lf32 840b395
              
                Fix tests by running make valid
              
              
                lf32 60683d0
              
                Match token args correction #450
              
              
                lf32 68205f8
              
                Add hyperlinks to urls in details #450
              
              
                lf32 968c538
              
                Update details, Improve UI #450
              
              
                lf32 3108089
              
                Merge v31.0.0 of 'main' into lf32-licensetext-devel
              
              
                lf32 6cd0243
              
                Ace editor upgraded from v1.4.12 to v1.9.5
              
              
                lf32 65277f1
              
                Improve details, highlights and tests
              
              
                lf32 bdae386
              
                Add report functionality to the summary
              
              
                lf32 81d1c6d
              
                Add new user interface and cleanup the old one
              
              
                lf32 bd15385
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 5c88367
              
                Remove unused tests and validate code format #450
              
              
                lf32 57a1d62
              
                Indent html, handle input, fix modules & tests#450
              
              
                lf32 3def711
              
                Add more licenses, highlight text properly #450
              
              
                lf32 ebcb6e2
              
                Set cursor style to help, add token attr desc #450
              
              
                lf32 cda3a40
              
                Connect left and right part of ui #450
              
              
                lf32 9c404cc
              
                Set predefined colors to 3 #450
              
              
                lf32 6fab923
              
                Add more colors & new test licenses
              
              
                lf32 4760050
              
                Add highlight color and get rid of modal #450
              
              
                lf32 e3281f7
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 45acd64
              
                Fix failing tests #450
              
              
                lf32 b719948
              
                Fix width for dropdown #450
              
              
                lf32 e3c8d79
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 3bca8e7
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 a165bd1
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 73a6571
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 dd2e8ab
              
                Write input file either in chunks or text #450
              
              
                lf32 5c30510
              
                Move scan to utility dropdown #450
              
              
                lf32 a5fa2b4
              
                Merge branch 'main' into lf32-licensetext-devel
              
              
                lf32 9787f44
              
                (tests) code format is vaildated #450
              
              
                lf32 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              
            Binary file not shown.
          
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # http://nexb.com and https://github.com/nexB/scancode.io | ||
| # The ScanCode.io software is licensed under the Apache License version 2.0. | ||
| # Data generated with ScanCode.io is provided as-is without warranties. | ||
| # ScanCode is a trademark of nexB Inc. | ||
| # | ||
| # You may not use this software except in compliance with the License. | ||
| # You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0 | ||
| # Unless required by applicable law or agreed to in writing, software distributed | ||
| # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
| # CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations under the License. | ||
| # | ||
| # Data Generated with ScanCode.io is provided on an "AS IS" BASIS, WITHOUT WARRANTIES | ||
| # OR CONDITIONS OF ANY KIND, either express or implied. No content created from | ||
| # ScanCode.io should be considered or used as legal advice. Consult an Attorney | ||
| # for any legal advice. | ||
| # | ||
| # ScanCode.io is a free software code scanning tool from nexB Inc. and others. | ||
| # Visit https://github.com/nexB/scancode.io for support and download. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|         
                  tdruez marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| # | ||
| # http://nexb.com and https://github.com/nexB/scancode.io | ||
| # The ScanCode.io software is licensed under the Apache License version 2.0. | ||
| # Data generated with ScanCode.io is provided as-is without warranties. | ||
| # ScanCode is a trademark of nexB Inc. | ||
| # | ||
| # You may not use this software except in compliance with the License. | ||
| # You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0 | ||
| # Unless required by applicable law or agreed to in writing, software distributed | ||
| # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
| # CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations under the License. | ||
| # | ||
| # Data Generated with ScanCode.io is provided on an "AS IS" BASIS, WITHOUT WARRANTIES | ||
| # OR CONDITIONS OF ANY KIND, either express or implied. No content created from | ||
| # ScanCode.io should be considered or used as legal advice. Consult an Attorney | ||
| # for any legal advice. | ||
| # | ||
| # ScanCode.io is a free software code scanning tool from nexB Inc. and others. | ||
| # Visit https://github.com/nexB/scancode.io for support and download. | ||
|  | ||
| from django.contrib import admin | ||
|  | ||
| # Register your models here. | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # http://nexb.com and https://github.com/nexB/scancode.io | ||
| # The ScanCode.io software is licensed under the Apache License version 2.0. | ||
| # Data generated with ScanCode.io is provided as-is without warranties. | ||
| # ScanCode is a trademark of nexB Inc. | ||
| # | ||
| # You may not use this software except in compliance with the License. | ||
| # You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0 | ||
| # Unless required by applicable law or agreed to in writing, software distributed | ||
| # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
| # CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations under the License. | ||
| # | ||
| # Data Generated with ScanCode.io is provided on an "AS IS" BASIS, WITHOUT WARRANTIES | ||
| # OR CONDITIONS OF ANY KIND, either express or implied. No content created from | ||
| # ScanCode.io should be considered or used as legal advice. Consult an Attorney | ||
| # for any legal advice. | ||
| # | ||
| # ScanCode.io is a free software code scanning tool from nexB Inc. and others. | ||
| # Visit https://github.com/nexB/scancode.io for support and download. | ||
|  | ||
| from django.apps import AppConfig | ||
|  | ||
|  | ||
| class ScantextConfig(AppConfig): | ||
| default_auto_field = "django.db.models.BigAutoField" | ||
|         
                  tdruez marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| name = "scantext" | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # http://nexb.com and https://github.com/nexB/scancode.io | ||
| # The ScanCode.io software is licensed under the Apache License version 2.0. | ||
| # Data generated with ScanCode.io is provided as-is without warranties. | ||
| # ScanCode is a trademark of nexB Inc. | ||
| # | ||
| # You may not use this software except in compliance with the License. | ||
| # You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0 | ||
| # Unless required by applicable law or agreed to in writing, software distributed | ||
| # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
| # CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations under the License. | ||
| # | ||
| # Data Generated with ScanCode.io is provided on an "AS IS" BASIS, WITHOUT WARRANTIES | ||
| # OR CONDITIONS OF ANY KIND, either express or implied. No content created from | ||
| # ScanCode.io should be considered or used as legal advice. Consult an Attorney | ||
| # for any legal advice. | ||
| # | ||
| # ScanCode.io is a free software code scanning tool from nexB Inc. and others. | ||
| # Visit https://github.com/nexB/scancode.io for support and download. | ||
|  | ||
| from django import forms | ||
|  | ||
|  | ||
| class EditorForm(forms.Form): | ||
|         
                  tdruez marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| input_text = forms.CharField( | ||
|         
                  tdruez marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| widget=forms.Textarea( | ||
| attrs={ | ||
| "rows": 30, | ||
| "class": "textarea has-fixed-size", | ||
| "placeholder": "Paste your license text here.", | ||
| } | ||
| ), | ||
| required=True, | ||
| ) | ||
|  | ||
| # def clean_input_text(self): | ||
| # input_text = self.cleaned_data.get("input_text") | ||
| # return " ".join(input_text.split()) | ||
|  | ||
| # def save(self, *args, **kwargs): | ||
| # license = super().save(*args, **kwargs) | ||
| # self.handle_input(license) | ||
| # return license | ||
|  | ||
| # class Media: | ||
| # js = ("add-inputs.js",) | ||
|  | ||
| # def handle_inputs(self, project): | ||
| # input_file = self.files.getlist("input_files") | ||
| # input_text = self.cleaned_data.get("input_text") | ||
| # print(input_text) | ||
| # if input_file: | ||
| # license.add_uploads(input_file) | ||
| # elif input_text: | ||
| # license.add_license(input_text) | ||
|  | ||
| # input_files = forms.FileField( | ||
| # required=False, | ||
| # widget=forms.ClearableFileInput( | ||
| # attrs={"class": "file-input", "multiple": False}, | ||
| # ), | ||
| # ) | ||
              Empty file.
          
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # http://nexb.com and https://github.com/nexB/scancode.io | ||
| # The ScanCode.io software is licensed under the Apache License version 2.0. | ||
| # Data generated with ScanCode.io is provided as-is without warranties. | ||
| # ScanCode is a trademark of nexB Inc. | ||
| # | ||
| # You may not use this software except in compliance with the License. | ||
| # You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0 | ||
| # Unless required by applicable law or agreed to in writing, software distributed | ||
| # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
| # CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations under the License. | ||
| # | ||
| # Data Generated with ScanCode.io is provided on an "AS IS" BASIS, WITHOUT WARRANTIES | ||
| # OR CONDITIONS OF ANY KIND, either express or implied. No content created from | ||
| # ScanCode.io should be considered or used as legal advice. Consult an Attorney | ||
| # for any legal advice. | ||
| # | ||
| # ScanCode.io is a free software code scanning tool from nexB Inc. and others. | ||
| # Visit https://github.com/nexB/scancode.io for support and download. | ||
|  | ||
| from django.db import models | ||
|  | ||
| # Create your models here. | 
        
          
          
            35 changes: 35 additions & 0 deletions
          
          35 
        
  scantext/templates/scantext/includes/license_summary_level.html
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| {% load humanize %} | ||
| <nav class="level is-mobile"> | ||
| <div class="level-item has-text-centered"> | ||
| <div> | ||
| <p class="heading">Percentage Of License Text</p> | ||
| <p class="title"> | ||
| <span> | ||
| {{ expr.percentage_of_license_text }} | ||
| </span> | ||
| </p> | ||
| </div> | ||
| </div> | ||
| <div class="level-item has-text-centered"> | ||
| <div> | ||
| <p class="heading">License Expressions</p> | ||
| <p class="title"> | ||
| <span> | ||
| {{ expr.license_expressions | length }} | ||
|         
                  tdruez marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
|         
                  tdruez marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| </span> | ||
| </p> | ||
| </div> | ||
| </div> | ||
| <div class="level-item has-text-centered"> | ||
| <div> | ||
| <p class="heading">Licenses</p> | ||
| <p class="title"> | ||
| <span> | ||
| {{ expr.licenses | length }} | ||
|  | ||
|         
                  tdruez marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| </span> | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </nav> | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| {% extends 'scanpipe/base.html' %} | ||
| {% load static humanize %} | ||
|  | ||
|  | ||
| {% block extrahead %} | ||
| <link rel="stylesheet" href="{% static 'billboard-3.0.1-datalab.min.css' %}" crossorigin="anonymous" /> | ||
| {% endblock %} | ||
|  | ||
| {% block content %} | ||
| <div class="container is-widescreen"> | ||
| {% include 'scanpipe/includes/navbar_header.html' %} | ||
| <div class="mx-5 mb-2">{% include 'scanpipe/includes/messages.html' %}</div> | ||
|  | ||
| <section class="section pt-0"> | ||
| <div class="is-flex is-justify-content-space-between mb-2"> | ||
| <div class="mb-2"> | ||
| <h1 class="title is-4">License Detection Summary</h1> | ||
| </div> | ||
| <div> | ||
| <a href="{% url 'license_scan' %}" class="button is-link"> | ||
| Scan Again | ||
| </a> | ||
| </div> | ||
| </div> | ||
| </section> | ||
|  | ||
| <hr class="mx-5"> | ||
| {% include "scantext/includes/license_summary_level.html" with expr=expr %} | ||
|         
                  tdruez marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| <hr class="mx-5"> | ||
|  | ||
| <div class="columns"> | ||
| <div class="column is-half"> | ||
| <p class="title is-4">Input License Text</p> | ||
| <div class="box"> | ||
| {% for line in text %} | ||
| <p>{{line}}</p> | ||
|         
                  tdruez marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| {% endfor %} | ||
| </div> | ||
| </div> | ||
| <div class="column is-half"> | ||
| <p class="title is-4">Detected License Errors</p> | ||
|  | ||
| {% for license in expr.licenses %} | ||
|  | ||
| <div class="card"> | ||
| <div class="card-header"> | ||
| <div class="card-header-title"> | ||
| <a class="" href="{{license.homepage_url}}" title="{{license.short_name}}">{{license.name| center:"15"}}</a> | ||
| <p class="tag is-6 mx-1 is-light | ||
| {% if license.score == 100 %} | ||
| is-success | ||
| {% else %} | ||
| is-warning | ||
| {% endif %} | ||
| ">{{license.score}}</p> | ||
| <p class="tag is-6 mx-1 is-light is-info"> | ||
| {% if license.start_line == license.end_line %} | ||
| Line {{license.start_line}} | ||
| {% else %} | ||
| Lines {{license.start_line}} - {{license.end_line}} | ||
| {% endif %} | ||
| </p> | ||
| <p class="tag is-6 mx-1 is-light is-primary">{{license.category}}</p> | ||
| </div> | ||
| <p class="card-header-icon" aria-label="more options"> | ||
| <span class="icon"> | ||
| <i class="fas fa-angle-down" aria-hidden="true"></i> | ||
| </span> | ||
| </p> | ||
| </div> | ||
| {% if license.score < 100 %} | ||
| <div class="card-content"> | ||
| <p class="subtitle is-5">Recommended License</p> | ||
| <p class="content">{{license}}</p> | ||
| </div> | ||
| {% endif %} | ||
| </div> | ||
| <br> | ||
| {% endfor %} | ||
| </div> | ||
| </div> | ||
| </div> | ||
| {% endblock %} | ||
|  | ||
| {% block scripts %} | ||
| <script type="text/javascript"> | ||
| const cards = document.querySelectorAll('.card') | ||
|  | ||
| // const cardsicons = document.querySelectorAll('.card-header-icon') | ||
| // cardsicons.forEach(icon => { | ||
| // icon.addEventListener('click', (e, index) => { | ||
| // e.preventDefault(); | ||
| // removeActiveCards(); | ||
| // console.log(e) | ||
| // console.log(index) | ||
| // icon.parentNode.parentNode.parentNode.querySelector('.card-content').style.display="visible" | ||
| // }) | ||
| // }) | ||
|  | ||
| // function removeActiveCards() { | ||
| // cards.forEach(card => { | ||
| // card.parentNode.parentNode.parentNode.querySelector('.card-content').style.display="none" | ||
| // }) | ||
| // } | ||
| </script> | ||
| {% endblock %} | ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.