Wordlint-0.1.0.0: man/man1/wordlint.1
.TH "WORDLINT" "1" "2014\-11\-22" "0.1.0.0
.SH Name
.PP
wordlint \- plaintext redundancy linter
.SH Synopsis
.PP
wordcheck [OPTIONS] [\-f input\-file]
.SH Description
.PP
Wordlint locates matching pairs of words repeated within a user\-defined
distance.
Text may be linted by distance between words (that is, by word count),
by line count, or by percentage of the total words in the file.
The user may also choose a minimum word length for matches.
.PP
Filters are available to remove punctuation, capitalization, and/or a
user\-defined list of words from the list of potential matches.
.PP
Various modes exist for data output, which is machine\-readable by
default.
Results may be sorted by alphabetically by word, by position (line
number), or by intervening distance between matches; and may be used
with a human\-readable mode.
Additionally, a Vim mode provides output for a plugin.
.SH Options
.TP
.B \-\-help
Display condensed help and exit.
.RS
.RE
.TP
.B \-f, \-\-file \f[I]FILE\f[]
Specify an input file.
If none is given, wordlint reads from stdin.
.RS
.RE
.SS Linting Options
.TP
.B \-d, \-\-distance \f[I]INT | FLOAT\f[]
Specify maximum intervening distance between returned word\-pairs.
\f[B]If the type of lint is either "word" or "line", an integer must be
used\f[], while a "percentage" check will accept a float value.
Ignored if \-a is used.
Default is 250.
.RS
.RE
.TP
.B \-t, \-\-type \f[I]word|line|percentage\f[]
Specify type of lint to perform, which affects which the calculation of
intervening distance between word pairs.
Options are:
.RS
.IP
.nf
\f[C]
\-\ word\ (default)
\-\ line
\-\ percentage
\f[]
.fi
.PP
A word\-type check will define a word\[aq]s "position" as it\[aq]s word
count, while a line check uses the line number on which a word is found.
A percentage check sets this value according to a word\[aq]s count
divided by the total count of words in the input.
.RE
.TP
.B \-w ,\-\-wordlength \f[I]NUMBER\f[]
Specify minimum length of words to be matched, i.e.
to reduce hits for "there".
Default is 5.
.RS
.RE
.SS Filters
.TP
.B \-b, \-\-blacklist
Specify a file containing a newline\-separated list of words (no spaces)
to filter from matches.
Pairs well with \-\-nopunct, which is applied before, but activated
prior to application of \-\-nocaps filter.
Thus, \-\-nocaps will not interfere, for example, with proper names
given in the blacklist.
.RS
.RE
.TP
.B \-\-nocaps
Ignore capitalization when determining matches.
.RS
.RE
.TP
.B \-\-nopunct
Ignore punctuation when determining matches.
.RS
.RE
.SS Output Options
.TP
.B \-a, \-\-all
Return all matched pairs of words regardless of intervening distance.
Deactivates \-d parameter.
.RS
.RE
.TP
.B \-h, \-\-human
Return human\-readable output.
Compatible with all sorting except for \f[C]\-\-show\ vim\f[], which
will supersede \f[C]\-\-human\f[].
.RS
.RE
.TP
.B \-s, \-\-sort \f[I]word|position|distance|vim\f[]
Sort word pairs alphabetically, by line number, or by intervening
distance; or provides Vim plugin output respective to the following
options:
.RS
.IP
.nf
\f[C]
\-\ word
\-\ position\ (default)
\-\ distance
\-\ vim
\f[]
.fi
.RE
.SH Examples
.IP
.nf
\f[C]
wordlint\ \-\-type\ line\ \-\-distance\ 20\ \-\-wordlength\ 7\ \-\-file\ file.txt
\f[]
.fi
.PP
Finds matching strings consisting of seven characters or more and which
have an intervening distance of twenty lines or less.
Returns machine\-readable format.
.IP
.nf
\f[C]
cat\ file.txt\ |\ wordlint\ \-t\ percentage\ \-d\ 2.5\ \-a\ \-s\ word\ \-h\
\f[]
.fi
.PP
Finds all matching, five\-characters\-or\-longer strings within a 2.5%
distance of one\-another within the file, and returns the output sorted
alphabetically and in human\-readable form.
.IP
.nf
\f[C]
wordlint\ \-f\ file.txt\ \-b\ dir/blacklist.txt\ \-\-nopunct\ \-\-nocaps
\f[]
.fi
.PP
Finds matching strings consisting of 5 characters or more, and which
have had punctuation, a list of words, and all capitalization stripped
from the possible matches.
Returns machine\-readable table.
.SH See Also
.PP
A Vim front\-end to Wordlint, creatively named Wordlint.vim, is
available at https://github.com/gbgar/Wordlint.vim
.SH AUTHOR
GB Gardner.