Logfind
========
A simple grep-like tool to find files containing one or more strings.

Usage
------
Logfind reads configuration from ``~/.logfind`` (by default) to figure out in
which files to look for the strings.  The format of this file is simple:

1. Each *absolute* file path on a line by itself.
2. Paths are specified as `Python regular expressions`_.
3. Blank lines (lines containing only white space characters) are ignored.
4. Lines beginning with ``#`` are comments and are also ignored.

To use the program, run::

        logfind [-o] regex [regex ...]

String(s) to match are specified as `Python regular expressions`_ just like
file paths are.

The program has one significant option:

-o      Instead of the default regex chaining (logical ``AND``), use logical
        ``OR`` chaining.

The output is a list of file paths containing the specified regular
expression(s), each on a separate line.

If you get errors along the lines of ``UnicodeDecodeError``, invalid start
byte, etc. make sure your path regular expressions aren't hitting binary files
like gzipped log archives and so on.

Development
-----------
To run tests do::

        python -m unittest discover

from the root of the distribution.


.. _Python regular expressions: https://docs.python.org/2/howto/regex.html

Logfind
========
A simple grep-like tool to find files containing one or more strings.

Usage
------
Logfind reads configuration from ``~/.logfind`` (by default) to figure out in
which files to look for the strings.  The format of this file is simple:

1. Each *absolute* file path on a line by itself.
2. Paths are specified as `Python regular expressions`_.
3. Blank lines (lines containing only white space characters) are ignored.
4. Lines beginning with ``#`` are comments and are also ignored.
5. Paths can have leading and trailing white space, which is stripped.

To use the program, run::

        logfind [-o] regex [regex ...]

String(s) to match are specified as `Python regular expressions`_ just like
file paths are.

The program has one significant option:

-o      Instead of the default regex chaining (logical ``AND``), use logical
        ``OR`` chaining.

The output is a list of file paths containing the specified regular
expression(s), each on a separate line.

If you get errors along the lines of ``UnicodeDecodeError``, invalid start
byte, etc. make sure your path regular expressions aren't hitting binary files
like gzipped log archives and so on.

Development
-----------
To run tests do::

        python -m unittest discover

from the root of the distribution.


.. _Python regular expressions: https://docs.python.org/2/howto/regex.html

Add note about trailing/leading white space.
Add note about trailing/leading white space.
