2017 © Pedro Peláez
 

library inspector

A fast inspector to inspect and edit files

image

wouterj/inspector

A fast inspector to inspect and edit files

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Inspector

Inspector is a simple tool that can be used to search in a directory for a given string or pattern., (*2)

Installation

Inspector is available as a composer package on packagist. Installing it is quite simple:, (*3)

$ composer create-project wouterj/inspector

Usage

This is a quick documentation, advantage documentation is added during the BETA period, (*4)

Inspector has just one command at this moment, called inspect. This will inspect a directory:, (*5)

# searches for files which contains 'hello'
$ php inspector.php inspect -p 'hello'

This command has multiple options:, (*6)

  • --pattern (-p): This is the pattern which you are looking for. (required), (*7)

    # searches for files which contains 'foo' or 'bar' $ php inspector.php inspect -p '/(foo|bar)/', (*8)

  • --dir (-d): This is the directory to search in, if this is empty it will search in the current directory., (*9)

    # searches in the %current_dir%/hello directory $ php inspector.php inspect -p 'foo' -d hello, (*10)

  • --filter (-f): This can be a Regex, to determine which files should be ignored, or a name of one of the build in filters (more about this in the filters section)., (*11)

    # ignores all php files $ php inspector.php inspect -p 'foo' -f '*.php', (*12)

Filters

Inspector has one build-in filter at the moment. Filters provide a solution for common --filter pattern., (*13)

GitIgnoreFilter

This filter will search for a .gitignore file in the root of the document and ingores every file that is in there., (*14)

$ php inspector.php inspect -p 'foo' --filter gitignore

Contributing

Inspector love contributors. Please, fork this repo, create a new branch, improve this code and open a PR. Inspector uses the Symfony Coding Standards, (*15)

If you do not want to contribute with writing code, you can also help to review the issues/PRs., (*16)

The Versions

23/01 2013
22/01 2013

v1.0.0-BETA1

1.0.0.0-beta1

A fast inspector to inspect and edit files

  Sources   Download

The Requires

 

The Development Requires