Skip to content

Commit

Permalink
Minor modifications in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharadwajyarlagadda committed May 24, 2017
1 parent fc1823d commit d878b3b
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Command Line Interface tool which helps in finding a given text/pattern in a giv
Links
=====

Project: https://github.com/bharadwajyarlagadda/finder
Documentation: Wiki_
Pypi: https://pypi.python.org/pypi/finder
TravisCI: https://travis-ci.org/bharadwajyarlagadda/finder
- Project: https://github.com/bharadwajyarlagadda/finder
- Pypi: https://pypi.python.org/pypi/finder
- TravisCI: https://travis-ci.org/bharadwajyarlagadda/finder
- Guidelines for contribution to project: https://github.com/bharadwajyarlagadda/finder/wiki/Contributing

Quickstart
==========
Expand All @@ -27,7 +27,6 @@ Install using pip:
Features
========


- Finds given text/pattern in the given file path(s).
- Iterates through all the non-executable files in a given directory path.
- Avoids all the non-readable files in a given directory path.
Expand Down Expand Up @@ -126,12 +125,12 @@ What does the API do?
1. The main entry point for our API is the ``api.find()`` method. You can pass in both file/directory paths and the pattern to be searched for.
2. If you provide a directory path, it will go ahead and do a ``os.walk`` and brings out all the files in that directory path.
3. While searching for the pattern,
* It avoids all the non-readable files:
* Audio files.
* Video files.
* Image files.
* Some of the kernel based files such as the files under ``/proc`` in ``Ubuntu/Linux.``
* It reads the file line by line so that we can avoid saving the whole file in the memory (which of course will be memory issue for huge files).
1. It avoids all the non-readable files:
1. Audio files.
2. Video files.
3. Image files.
4. Some of the kernel based files such as the files under ``/proc`` in ``Ubuntu/Linux.``
2. It reads the file line by line so that we can avoid saving the whole file in the memory (which of course will be memory issue for huge files).
4. This whole process runs concurrently. As in, the API allots thread for each file to be searched and once the search is complete, the thread comes and joins back in the main process.
5. I personally have tested the performance and the memory usage is very low. If you face any of the performance issues, please report it at Issues_.
6. The data from the API looks is explained under ``Schema`` section. The output fields are also explained in the same section.
Expand Down Expand Up @@ -170,12 +169,15 @@ Data fields:
- ``path``: File path
- ``total_items``: Total items returned.
- ``items``: All the data items returned from the finder tool. The items comprise of:
* ``line_number``: Line number at which the pattern was found.
* ``line``: Actual line in which the pattern was found.

* ``line_number``: Line number at which the pattern was found.
* ``line``: Actual line in which the pattern was found.

- ``error``: Errors from the finder tool if any.
* ``type``: Error type (Ex. PermissionError, OSError, etc.)
* ``message``: Error message from the finder tool.
* ``extra``: Any extra error message from the finder tool.

* ``type``: Error type (Ex. PermissionError, OSError, etc.)
* ``message``: Error message from the finder tool.
* ``extra``: Any extra error message from the finder tool.


Example
Expand Down Expand Up @@ -229,5 +231,4 @@ When there are errors while searching the file,
:target: https://github.com/bharadwajyarlagadda/finder/blob/master/LICENSE.rst


.. _Wiki: https://github.com/bharadwajyarlagadda/finder/wiki
.. _Issues: https://github.com/bharadwajyarlagadda/finder/issues

0 comments on commit d878b3b

Please sign in to comment.