Crate gengo

Crate gengo 

Source
Expand description

Gengo is a language detection library for collections of files. Currently, it supports reading from git repositories.

§Features

§directory

Provides the Directory file source, which reads files from a local directory.

§git

Provides the Git file source, which reads files from a git repository. It reads from a specified revision and supports git attributes for overrides, making it the most similar to GitHub Linguist. Because of this, it also works on bare repositories.

§Example

use gengo::{Builder, Git};
let git = Git::new("path/to/repo", "HEAD").unwrap();
let gengo = Builder::new(git).build().unwrap();
let results = gengo.analyze().unwrap();

Re-exports§

pub use analysis::Analysis;

Modules§

analysis
language

Structs§

Builder
Builds a new Gengo instance.
Directory
A file source that reads files from a directory.
Entry
A single entry in the language statistics.
Error
Gengo
The main entry point for Gengo.
Git

Enums§

ErrorKind
The kind of error that occurred.
Language
The type of language. Returned by language detection.

Traits§

FileSource
Provides files and overrides.