packages feed

Wordlint-0.2.0.3: man/man1/wordlint.1

.TH "WORDLINT" "1" "2015\-02\-24" "0.2.0.3
.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, and/or by percentage of the total words in the file.
Multiple lint types may be specified at one time.
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 column\-based and
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, an "error" mode may supersede these options to provide
output designed for easy integration with text editors.
.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 \-w, \-\-words \f[I]INT\f[]
Specify maximum intervening distance between returned word\-pairs
measuring by word count.
This may intersect with the \-\-lines and \-\-percent options, but is
ignored if \-a is provided.
Default is 250.
.RS
.RE
.TP
.B \-l, \-\-distance \f[I]INT\f[]
Specify maximum intervening distance between returned word\-pairs
measuring by line count.
This may intersect with the \-\-words and \-\-percent options, but is
ignored if \-a is provided.
Default is 0 (off).
.RS
.RE
.TP
.B \-p, \-\-percent \f[I]DOUBLE\f[]
Specify maximum intervening distance between returned word\-pairs
measuring by percentage of words.
This may intersect with the \-\-words and \-\-lines options, but is
ignored if \-a is provided.
Default is 0 (off).
.RS
.RE
.TP
.B \-m ,\-\-matchlength \f[I]NUMBER\f[]
Specify minimum length of words to be matched, i.e.
to reduce hits for "the".
Default is 5.
.RS
.RE
.SS Filters
.TP
.B \-b, \-\-blacklist \f[I]FILE\f[]
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\ error\f[], which
will supersede \f[C]\-\-human\f[].
.RS
.RE
.TP
.B \-s, \-\-sort \f[I]word|position|distance|error\f[]
Sort word pairs alphabetically, by line number, or by intervening
distance; or provides output designed for error checking in text
editors\-\-\-respective to the following options:
.RS
.IP
.nf
\f[C]
\-\ word
\-\ position\ (default)
\-\ distance
\-\ error
\f[]
.fi
.RE
.SH Examples
.IP
.nf
\f[C]
wordlint\ \-\-file\ file.txt
\f[]
.fi
.PP
Runs the default check: a word\-based check on words of five or more
characters.
The distance between each match is to be no more than 250 words.
The results are in a machine\-readable table format (i.e.
for easy use with \f[C]awk\f[], \f[C]sed\f[], and the like).
.IP
.nf
\f[C]
wordlint\ \-\-lines\ 20\ \-\-matchlength\ 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]
wordlint\ \-w\ 100\ \-l\ 20\ \-m\ 7\ \-f\ file.txt
\f[]
.fi
.PP
Finds matching strings consisting of seven characters or more and which
fall within an intervening distance of \f[I]both\f[] 100 words
\f[I]and\f[] twenty lines or less.
Returns machine\-readable format.
.IP
.nf
\f[C]
cat\ file.txt\ |\ wordlint\ \-\-percent\ 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\ \-s\ error
\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 output designed for use in text editors (i.e.
Vim\[aq]s \[aq]erororformat\[aq] option).
.SH See Also
.PP
A Vim front\-end to Wordlint, creatively named Wordlint.vim, is
available at <https://github.com/gbgar/Wordlint.vim>
.PP
A compiler and a flycheck interface are available for Emacs:
<https://github.com/gbgar/wordlint.el> and
<https://github.com/gbgar/flycheck-wordlint.el>.
.SH AUTHOR
GB Gardner.