Coder Social home page Coder Social logo

jeremy-lq / licenses-html-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stephentuso/licenses-html-generator

0.0 1.0 0.0 34 KB

Node.js script to generate html licenses file from list of sources (git repos or local files)

Home Page: http://stephentuso.github.io/licenses-html-generator/

License: MIT License

JavaScript 90.60% CSS 5.88% HTML 3.52%

licenses-html-generator's Introduction

Licenses html generator

npm

Generates an html licenses file from a list of license sources, which can be git repos or local files. For git repos, it makes a shallow clone and automatically gets the license from the readme or license file.

Example input file

Example generated page

All contributions welcome!

Usage

  1. Install with npm install -g licenses-html-generator

  2. Create a new directory for the script to do its thing in (this is where it will clone any git repos and where the output html file will be)

  3. In that directory, create a file called sources.json that contains a json array of sources:

[
    {
        "name": "Example 1",
        "uri": "https://github.com/example/example-repo.git"
    },
    {
        "name": "Example 2",
        "uri": "./local-license-text-file.txt"
    }
]

  1. Run licenses-html-generator /path/to/dir/from/step/2. The html file will be located at ./out/licenses.html

Templates

The output can be customized by adding a folder called templates to the directory containing sources.json and adding any of the following files:

head.html - Contents for the head tag

styles.css - CSS that will be inlined. Use .license to style the licenses. This is added in addition to the default styles. To override the default styles use default-styles.css

header.html - Html to go at top of page, above all licenses. Will be contained in a header element.

license-header.html - Html that comes before each license. Put <!--NAME--> where you want the name of the license to go.

license.html - For wrapping the license html. Put <!--LICENSE--> where you want the license html to go.

footer.html - Html for the bottom of the page. Will be contained in a footer element. If you don't want to have "Created with Licenses HTML Generator" at the bottom, create this file.

License

Released under the MIT License.

licenses-html-generator's People

Watchers

 avatar

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.