github / choosealicense.com

A site to provide non-judgmental guidance on choosing a license for your open source project
https://choosealicense.com
MIT License
3.65k stars 1.32k forks source link

Generate json file compatible with "FSF License Metadata API" #663

Open reversi-fun opened 5 years ago

reversi-fun commented 5 years ago

In order to make your data more reusable, please generate the file shown in the title.

"FSF License Metadata API" is defined in the following site. It is a convenient data format that can be reused. https://wking.github.io/fsf-api/licenses-full.json

That data format can associate the license identifiers with the catalog name and "tags". For example,

 {"licenses":{
    "apsl2": { /* fileName of choosealicense.com/_licenses/apsl2.txt  */
       "name": "Apple Public Source License",
         "identifiers": {
                "spdx": ["APSL-2.0"],
                "OSI" : ["Apple Public Source License"],
                "FSF" : ["FSF/apsl"]
                ]
            },
        "tags": [
        "libre"  /* FSF information*/,
                "patent-use" /* choosealicense information */
        ]
   }
 }

Please have a look at the data I made for a trial. https://github.com/reversi-fun/license_doc_similality1/blob/master/config/choosealicense-attrs.json

From this json data and the similarity of the license text, you can deduce the characteristics of the unknown license.

For example, SPDX / ODC-by-1.0 is not included in choosealicense, but it can be inferred that it has characteristics similar to SPDX / ODbl-1.0.

Please look at the attached figure. https://github.com/reversi-fun/license_doc_similality1/blob/master/data/lic_graph.sfdp.svg license-odc-by-ODbl

mlinksva commented 5 years ago

Hi @reversi-fun I'm reluctant to add another data format which others might rely on without thinking through it a bit. The FSF API was created as a stop gap measure by @wking since the FSF doesn't have an easily machine readable version of their list, see https://github.com/wking/fsf-api

However, I welcome this issue because it got me thinking...I suspect it'd be entirely feasible to split out the license metadata from the license texts in this repo, having the metadata in separate data files. That would make using both the metadata and the license texts more trivial, no preprocessing needed. That need for preprocessing has been a minor annoyance for me many times. I'm going to play around with removing it, but no promise on quick turnaround.

reversi-fun commented 5 years ago

@mlinksva, Thanks to response. I seems that You want to implement it with license metadata in yoies own format. OK, I request the following for your license metadata: