Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

textstat-go

Textstat is an utility to get statistics about text content.

The main reason behind this is me wanting to hack on a nice little project. Textstat happens to be well suited to explore new technologies.

Preview

I am glad about any suggestions since I'm only learning here. Feel free to use the Issues / Pull Request.

(There's also a Ruby version of this project.)

Setup

Usage

Textstat can be used as a command-line tool or imported as Go package.

Command-line

You can pass a path to a file:

textstat-go texts/shakespeare.txt

Or stream content to Textstat:

echo 'some content' | textstat-go
textstat-go < texts/shakespeare.txt
cat texts/shakespeare.txt | textstat-go

To analyze a whole folder you could run:

find . -type f -print0 | xargs -0 cat | textstat-go

Go API

Import the package:

import (
  textstat "github.com/jorin-vogel/textstat-go/lib"
)

For now see textstat.go details on the API.

Development

Requirements

  • Make sure you have Go installed.

Setup

  • Download the repo: go get github.com/jorin-vogel/textstat-go

Workflow

  • Test the code with go test or go test -cover.
  • Update the binary using go install.

License

MIT

About

Textstat is a cli tool to get statistics about text content

Resources

License

Releases

No releases published

Packages

No packages published

Languages