You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+12
Original file line number
Diff line number
Diff line change
@@ -26,42 +26,53 @@ This repo is organized like so:
26
26
This repository is a work in progress, and still in early development.
27
27
28
28
## Installation
29
+
29
30
To install `gtars`, you must have the rust toolchain installed. You can install it by following the instructions [here](https://www.rust-lang.org/tools/install).
30
31
31
32
You may build the binary locally using `cargo build --release`. This will create a binary in `target/release/gtars`. You can then add this to your path, or run it directly.
32
33
33
34
## Usage
35
+
34
36
`gtars` is very early in development, and as such, it does not have a lot of functionality yet. However, it does have a few useful tools. To see the available tools, run `gtars --help`. To see the help for a specific tool, run `gtars <tool> --help`.
35
37
36
38
Alternatively, you can link `gtars` as a library in your rust project. To do so, add the following to your `Cargo.toml` file:
If you'd like to add a new tool, you can do so by creating a new module within the src folder.
48
54
49
55
### New public library crate tools
56
+
50
57
If you want this to be available to users of `gtars`, you can add it to the `gtars` library crate as well. To do so, add the following to `src/lib.rs`:
51
58
```rust
52
59
pubmod <tool_name>;
53
60
```
54
61
55
62
### New binary crate tools
63
+
56
64
Finally, if you want to have command-line functionality, you can add it to the `gtars` binary crate. This requires two steps:
65
+
57
66
1. Create a new `cli` using `clap` inside the `interfaces` module of `src/cli.rs`:
67
+
58
68
```rust
59
69
pubfnmake_new_tool_cli() ->Command {
60
70
61
71
}
62
72
```
63
73
64
74
2. Write your logic in a wrapper function. This will live inside the `functions` module of `src/cli.rs`:
0 commit comments