Note: 🌶 This is a first attempt to Rust programming.
This project is a pathfinder/inspector for Python classes. A very minimal implementation of a CLI tool that helps you find Python classes. It aims to help you find classes without changing files or view to understand classes and it shows you the methods and arguments of it very beautiful in the terminal
Installing jones
requires having the latest rust and cargo.
After that, by simply running this command the jones
CLI would be installed:
cargo install jones
Version | Supported |
---|---|
>=3.5 | True |
==2.7 | False |
Obviously for a better understanding of jones
capabilities you can always type:
jones --help
This will show you all the flags and arguments that jones
has
The --grep
flag will find all the Python classes containing a keyword given for search. The keyword should be used in cased format as Python classes are usually written in camel case.
For example:
jones -g Tool
This would return all classes that contain the Tool word and would show you in which files are found exactly as the usual grep.
> [FOUND MATCHES]
:: class Tool: -> ~/project/src/band.py
:: class ToolMind: -> ~/project/src/golden_ratio.py
Note: This is still in development as it should be renamed to smart search. The smart search will be used to find classes based on a keyword and the context in which the keyword is used
To display the class methods and arguments just use jones
without any flag. For example:
jones Tool
This will search for the class tool in the current directory which you called jones
(if the directory path is not specified). If the directory path is specified jones
will search there. For example:
jones Tool ~/band_project
Output:
# Class [Board]
-------
*docstring: Tic Tac Toe board
* inherit -> Tool
# Methods
-------
:: [__init__] -> None
* self: None
:: [__getitem__] -> ndarray
* self: None
* x: int
:: [display] -> None
* self: None
:: [mark] -> None
* self: None
* tag: Markers
* x: int
* y: int