Skip to main content

A fast keyword searcher

Project description

"Universal" Text Finder

Test Status Coverage Status

It's basically just grep in python... Nothing fancy, just an easy extensible way to find things....

Yeah, I know, it's "reinventing the wheel" but ehhh, this is easier to extend to cover any and all weird cases without having to memorize a bunch of obscure combinations of bash commands.

That out of the way, let's talk about what this actually does...

Installation

┬─[zoe@fillory:~/Dropbox/Projects/black-arrow]─[09:22:12 PM]
╰─>$ pip install --user blackarrow

Black-Arrow Script

┬─[zoe@fillory:~/Dropbox/Projects/black-arrow][09:33:40 PM]
╰─>$ ./black-arrow/blackarrow.py -h
usage: blackarrow.py [-h] [-r REGEX] [-d DIRECTORIES [DIRECTORIES ...]]
                     [-i IGNORE [IGNORE ...]] [-f FILENAME [FILENAME ...]]
                     [-w WORKERS] [-p] [-e]
                     [R]

positional arguments:
  R                     Search term (regular expression)

optional arguments:
  -h, --help            show this help message and exit
  -r REGEX, --regex REGEX
                        Search term (regular expression)
  -d DIRECTORIES [DIRECTORIES ...], --directories DIRECTORIES [DIRECTORIES ...]
                        Director(y|ies) to run against
  -i IGNORE [IGNORE ...], --ignore IGNORE [IGNORE ...]
                        Things to ignore (regular expressions)
  -f FILENAME [FILENAME ...], --filename FILENAME [FILENAME ...]
                        Filename search term(s)
  -w WORKERS, --workers WORKERS
                        Number of workers to use (default 2)
  -p, --pipe            Run in "pipe" mode with brief output
  -e, --edit            Edit the files?

┬─[zoe@fillory:~/Dropbox/Projects/black-arrow]-[09:35:40 PM]
╰─>$ ./blackarrow.py biz
./sample/tester.txt:1
	barzzz barzzz biz bang
./sample/tester.txt:2
	barzzz barzzz biz bang
./sample/tester.txt:3
	barzzz barzzz biz bang
./sample/tester.txt:4
	barzzz barzzz biz bang
---------------
Files Searched: 11
Files Matched: 1
Lines Searched: 639
Duration: 0.04977011680603027

The Name

"Arrow! Black arrow! I have saved you to the last. You have never failed me and I have always recovered you. I had you from my father and he from of old. If ever you came from the forges of the true king under the Mountain, go now and speed well!"

― J.R.R. Tolkien, The Hobbit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for blackarrow, version 1.0.7
Filename, size & hash File type Python version Upload date
blackarrow-1.0.7-py3-none-any.whl (7.1 kB) View hashes Wheel py3
blackarrow-1.0.7.tar.gz (7.0 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page