Install • Usage • Changelog • Contributing • License
go install github.com/edoardottt/go-readingtime/cmd/readt@latest
CLI tool
readt <filepath>
Golang module
package main
import (
"fmt"
reading "github.com/edoardottt/go-readingtime"
)
func main() {
s := reading.RawEstimate(`Lorem ipsum dolor sit amet, consectetur...`)
fmt.Println(s) // 130
d := reading.Estimate(`Lorem ipsum dolor sit amet, consectetur...`)
fmt.Println(d) // 2m10s
h := reading.HumanEstimate(`Lorem ipsum dolor sit amet, consectetur...`)
fmt.Println(h) // 2 minutes
}
Read the package documentation here
.
Detailed changes for each release are documented in the release notes.
Just open an issue / pull request.
Before opening a pull request, download golangci-lint and run
golangci-lint run
If there aren't errors, go ahead :)
This repository is under MIT License.
edoardoottavianelli.it to contact me.