Giter VIP home page Giter VIP logo

spdx-tools-js's Introduction

Javascript equivalent of SPDX's python-tools

The Software Package Data Exchange (SPDX) specification is a standard format for communicating the components, licenses and copyrights associated with a software package. The goal is to accompany software with special files that hold certain meta information: authorship, copyrights, licenses, etc. A JavaScript library for parsing, validating and creating SPDX documents will go a long way in complimenting the existing Java, Python and GO libraries and to ease the integration of SPDX specifications in project that are build on JavaScript frameworks such as NodeJs, ReactJs e.t.c.

The JavaScript Library will be inspired by the work that has been done already on the Python and/or Java libraries. The implementation would most comprise of porting existing design and code implementation of the Python and/or Java libraries. The diagram below 2 reveals the full architecture of SPDX v2.1 Document Specification which is the most supported and stable version.

The SPDX Java library implements all the aspects and recommendations suggested in the architecture exposing users with the following functions :

  • TagToSpreadsheet - Convert a tag format input file to a spreadsheet output file
  • TagToRDF - Convert a tag format input file to an RDF format output file
  • RdfToTag - Convert an RDF format input file to a tag format output file
  • RdfToHtml - Convert an RDF format input file to an HTML web page output file 3
  • RdfToSpreadsheet - Convert an RDF format input file to a spreadsheeet format output file
  • SpreadsheetToRDF - Convert a spreadsheet input file to an RDF format output file
  • SpreadsheetToTag - Convert a spreadsheet input file to a tag format output file
  • SPDXViewer - Display an SPDX document input file (in either tag/value or RDF format)
  • CompareMultipleSpdxDocs - Compare multiple SPDX documents (in either tag/value or RDF formats) and output to a spreadsheet
  • CompareSpdxDocs - Compare two SPDX documents (in either tag/value or RDF format)
  • GenerateVerificationCode - Geneinkrate a Verification Code from a directory of files.

Installation and Usage

  • Create a virtualenv for the project
  • Activate the virtualenv
  • Clone the project in the virtualenv
  • Install node modules: npm install
  • Build the project: npm run build
  • Use The project is now fit for use in any of your javascript apps. For now, I left the command npm run start to create an spdx tv document

spdx-tools-js's People

Contributors

ndip007 avatar

Watchers

 avatar  avatar

spdx-tools-js's Issues

Suggested license documentation

Suggest using the MIT rather than ISC since MIT is more common for NodeJS and JavaScript open source.

I would also suggest adding a comment in each file:

SPDX-License-Identifier: MIT

per license best practices.

A copy of the license should also be included in the root of the project (e.g. a License.txt file).

Kudos!

@ndip007 Keep up the good work. Really pleased to see you make progress :)

Externalize the reference to license.json file

Having the license.json file local to the project requires re-distributing the software. The licenses.json file gets updated every 3 months. Suggest one or more of the following approaches:

  • Allow the licenses.json file to be passed into config.js. Default would be the current local licenses.json file.
  • Fetch the licenses.json file from spdx.org/licenses/licenses.json file on startup. If the file can not be fetched, fall back to the local licenses.json file.

package-lock.json

@ndip007 package.json will usually present the dependencies. You can omit the package-lock.json in your next commit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.