Skip to content

Commit 1536d3d

Browse files
committed
add newlines to readme
1 parent 47b6316 commit 1536d3d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -26,42 +26,53 @@ This repo is organized like so:
2626
This repository is a work in progress, and still in early development.
2727

2828
## Installation
29+
2930
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).
3031

3132
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.
3233

3334
## Usage
35+
3436
`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`.
3537

3638
Alternatively, you can link `gtars` as a library in your rust project. To do so, add the following to your `Cargo.toml` file:
39+
3740
```toml
3841
[dependencies]
3942
gtars = { git = "https://github.com/databio/gtars" }
4043
```
4144

4245
## Testing
46+
4347
To run the tests, run `cargo test`.
4448

4549
## Contributing
50+
4651
### New internal library crate tools
52+
4753
If you'd like to add a new tool, you can do so by creating a new module within the src folder.
4854

4955
### New public library crate tools
56+
5057
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`:
5158
```rust
5259
pub mod <tool_name>;
5360
```
5461

5562
### New binary crate tools
63+
5664
Finally, if you want to have command-line functionality, you can add it to the `gtars` binary crate. This requires two steps:
65+
5766
1. Create a new `cli` using `clap` inside the `interfaces` module of `src/cli.rs`:
67+
5868
```rust
5969
pub fn make_new_tool_cli() -> Command {
6070

6171
}
6272
```
6373

6474
2. Write your logic in a wrapper function. This will live inside the `functions` module of `src/cli.rs`:
75+
6576
```rust
6677
// top of file:
6778
use tool_name::{ ... }
@@ -75,6 +86,7 @@ pub fn new_tool_wrapper() -> Result<(), Box<dyn Error>> {
7586
Please make sure you update the changelog and bump the version number in `Cargo.toml` when you add a new tool.
7687

7788
### VSCode users
89+
7890
If you are using VSCode, make sure you link to the `Cargo.toml` inside the `.vscode` folder, so that `rust-analyzer` can link it all together:
7991
```json
8092
{

0 commit comments

Comments
 (0)