Skip to main content

User-friendly, tiny source code searcher written by pure Python.

Project description

User-friendly, tiny source code searcher written in pure Python.

Actions Status GitHub issues GitHub stars GitHub license Downloads

Installation

bor can be installed by running pip install bor. It requires Python 3.8.0+ to run.

Usage

bor currently supports class and def keywords. Other Python keywords will be added in the future releases.

bor {keyword} {pattern}

By default, bor runs in your current directory. You can run bor with the specific source file or directory:

bor {keyword} {pattern} {source_file_or_directory}

Configuration

By default, if bor encounters an error(syntax, indentation error etc.) while analyzing files, it will stop working. If you want to the ignore errors, you can use --ignore-error or -i argument. For example;

bor class Cat --ignore-error

Example Usages

Cat is equivalent in the regular expression as ^Cat$

bor class Cat

Output:

Cat at examples/test.py:18

.Cat is equivalent in the regular expression as Cat$

bor class .Cat

Output:

Cat at examples/test.py:18
BlueCat at examples/test.py:26

get. is equivalent in the regular expression as ^get

bor def get. examples/test.py

Output:

get_value at examples/test.py:5
get_blue_value at examples/test.py:11
get_purple_value at examples/test.py:14
get_meow at examples/test.py:22

.cat. is equivalent in the regular expression as cat+

bor def .cat.

Output:

catch_me_if_you_can at examples/test.py:8
am_i_blue_cat at examples/test.py:30
where_is_the_cat at examples/test.py:38

Project details


Download files

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

Source Distribution

bor-0.2.0.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

bor-0.2.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page