Skip to content

Simple extendable line counter

License

Notifications You must be signed in to change notification settings

mymmrac/the-line

Repository files navigation

The Line

Simple extendable line counter

Installation

go install github.com/mymmrac/the-line@latest

# Optionally rename binary 
mv $GOPATH/bin/the-line $GOPATH/bin/tl

NOTE: Make sure to add $GOPATH/bin to $PATH to use

Usage

# Search for all files/folders in current dir and count lines in Go files
tl -p go -r .

# Help info
tl --help

Features

List of supported features (or TBD features)

Filters:

  • Match
  • Prefix/suffix
  • Contains
  • Length
  • Regexp
  • Blank
  • Any
  • Union
  • Intersection
  • Not

Modifiers:

  • Trim spaces/prefix/suffix
  • To lower

Configs:

  • Embedded (default config included in binary)
  • YAML (user defined config)

CLI:

  • Pretty interface using Charm
  • Minimal output (regular stdout)
  • Output only total
  • Output grouped by folders
  • Show used/matched by profiles/skipped files

Refactoring

  • Main
  • Display
  • Make packages