Skip to content

adosib/cli_search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Text Search CLI

CLI

What

This is a basic text search CLI created using the argparse python package. At the moment, all this utility does is take a string of text and parses files in a provided directory for the text. The standard output is the resulting files in which the text was found.

For more detailed information on set-up and running from the command line, please see my blog post where I work through the project set-up, installation, and running.

Installing

Clone the contents of this repo and in the project's root directory run

$ pip install -e .

Running

Replace the items in angle brackets with the appropriate commands. The -ext and -root arguments are optional.

  • ext is a list of space-separated extensions to filter the files being searched (e.g. only search .js and .py files)
  • root is a string representing the root directory to crawl for files to parse. Default is the current working directory.
$ python search.py "<some string here>" -ext <list of space-separated extensions e.g.: .py .js .html> -root "</some/root/directory/path>"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages