https://github.com/vladned/jonescli
CLI project for searching and inspecting Python classes. Build with Rust
https://github.com/vladned/jonescli
cli documentation-tool python-docs rust rust-lang
Last synced: 10 months ago
JSON representation
CLI project for searching and inspecting Python classes. Build with Rust
- Host: GitHub
- URL: https://github.com/vladned/jonescli
- Owner: vladNed
- License: mit
- Created: 2021-06-18T06:00:40.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-09T09:13:18.000Z (over 2 years ago)
- Last Synced: 2023-08-09T11:15:26.467Z (over 2 years ago)
- Topics: cli, documentation-tool, python-docs, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 60.5 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Jones CLI
[](https://github.com/Fremen-Solutions/jonescli/actions/workflows/pipeline-jones.yml)

# Context
> 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
# Installation
Installing `jones` requires having the latest rust and cargo.
After that, by simply running this command the `jones` CLI would be installed:
```bash
cargo install jones
```
## Supported Python Projects
| Version | Supported |
| :---: | :---: |
| >=3.5 | True |
| ==2.7 | False |
# Usage
Obviously for a better understanding of `jones` capabilities you can always type:
```bash
jones --help
```
This will show you all the flags and arguments that `jones` has
## Search/grep for classes
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:
```bash
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
## Showing class features
To display the class methods and arguments just use `jones` without any flag. For example:
```bash
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:
```bash
jones Tool ~/band_project
```
Output:
```bash
# 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
```