gitlang

command module
v0.0.0-...-22679e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 13 Imported by: 0

README

Gitlang

Gitlang can detect languages used in GitHub repository.

Table of Contents

Installation

go get -u github.com/hnts/gitlang

Usage

$ gitlang --help

NAME:
  gitlang - Detecting Languages for GitHub Repository
  USAGE:
    main [global options] repository_url
    
  GLOBAL OPTIONS:
    --format value  format (table, json) (default: "table")
    --help, -h      show help (default: false)

Getting Started

Using gitlang as CLI app

You can use gitlang as cli app.

Default Fotmat
$ gitlang https://github.com/hnts/gitlang
+---------------------------------+----------+--------+
|               URL               | Language | Ratio  |
+---------------------------------+----------+--------+
| https://github.com/hnts/gitlang |    Go    | 100.0% |
+---------------------------------+----------+--------+

Json Format
$ gitlang --format json https://github.com/hnts/gitlang | jq .
{
  "URL": "https://github.com/hnts/gitlang",
  "Languages": [
    {
      "Name": "Go",
      "Ratio": 100
    }
  ]
}

Detecting languages used in private repository

If you want to detect languages used in private repository, please set GITHUB_TOKEN

export GITHUB_TOKEN=your_github_api_key

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL