Skip to content

Latest commit

 

History

History
 
 

gengo-bin

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

gengo (言語)

library binary CI codecov

A bit like tokei, a lot like linguist.

Comparison

Feature/Behavior linguist tokei gengo
Analyze Git Revision Yes No Yes
Analyze Directory No Yes No
Requires Git Repository Yes No Yes
Detect Language by Extension Yes Yes Yes
Detect Language by Filename Yes Yes Yes
Detect by Filepath Pattern No No Yes
Detect Language with Heuristics Yes No Yes
Detect Language with Classifier Yes No Not Yet ;)

Installation

Install Script

Behind the scenes, this script downloads a binary from the latest GitHub release.

This will activate sudo to write the executable. Please review the install script before running it.

Unix

curl https://raw.githubusercontent.com/spenserblack/gengo/main/install.sh | sh

From GitHub Releases

Download the appropriate file from a release.

With cargo

The following installs the gengo binary.

cargo install gengo-bin

Docker

You can build a docker image and run it as well.

docker build -t gengo .
docker run --rm -v $(pwd):$(pwd) -w $(pwd) -t gengo

Or pull it from the GitHub Container Registry.

Usage

Overrides

Like linguist, you can override behavior using a .gitattributes file. Basically, just replace linguist-FOO with gengo-FOO. Unlike linguist, gengo-detectable will always make a file be included in statistics (linguist will still exclude them if they're generated or vendored).

# .gitattributes

# boolean attributes:

# These can be *negated* by prefixing with `-` (`-gengo-documentation`).
# Mark a file as documentation
*.html gengo-documentation
# Mark a file as generated
my-built-files/* gengo-generated
# Mark a file as vendored
deps/* gengo-vendored

# string attributes:
# Override the detected language for a file
# Spaces must be replaced with hyphens. Case-insensitive.
templates/*.js gengo-language=Plain-Text

You will need to commit your .gitattributes file for it to take effect.