Skip to content
/ executor Public

rust cli tool to recursively execute/search/delete files

License

Notifications You must be signed in to change notification settings

jozhw/executor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Executor: A Rust CLI Tool to Execute/Search/Delete Files

Static Badge Codecov branch GitHub Workflow Status (with event) GitHub Workflow Status (with event) GitHub Workflow Status (with event) GitHub release (with filter) GitHub all releases


IMPORTANT: execute command was not tested for windows os.

Commentary

The goal of this project is for my personal learnings and utility. Thus, I did my best to minimize the layers of abstractions through avoiding the use of libraries that others have developed.

For example, there is a much better implementation of traversing through directories than the one I wrote - that being what is available in the walkdir crate. Although I would have benefited greatly if the goal of this project was the build a tool that was the most production ready and efficient as possible. However, since this project mainly focused on honing my programming acumen, it made sense not to use that crate - despite it provided better tooling that what I was able to build.

Commands

There are three commands for executor: execute, search, and delete.

Execute

Usage: executor execute [OPTIONS] --fname <FNAME>

Options:
  -f, --fname <FNAME>  Name of the file to execute
  -p, --path <PATH>    Optional: Path to the root directory to begin the file execution search. root directory to initiate execution search
  -d, --depth <DEPTH>  Optional: Give the depth of the execution search default will search through all nested directories of the root
  -h, --help           Print help

Search

Usage: executor search [OPTIONS] --regex <REGEX>

Options:
  -r, --regex <REGEX>  Name of the file to execute (supports regex)
  -p, --path <PATH>    Optional: Path to the root directory to begin the search. root directory to initiate deletion search
  -d, --depth <DEPTH>  Optional: Give the depth of the search default will search through all nested directories of the root
  -h, --help           Print help

Delete

Usage: executor delete [OPTIONS] --fname <FNAME>

Options:
  -f, --fname <FNAME>  Name of the file to execute
  -p, --path <PATH>    Optional: Path to the root directory to begin the file deletion search. root directory to initiate deletion search
  -d, --depth <DEPTH>  Optional: Give the depth of the deletion search default will search through all nested directories of the root
  -h, --help           Print help