Skip to content

Commit

Permalink
Update metadata for docs.rs build, release v0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed May 13, 2020
1 parent b2fc2fc commit 152b5cb
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 55 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v0.8.1 git-anger-lib

> 2020-05-13
A patch release to update the documentation and make `docs.rs` build with all
features enabled.

## Changes

- [[`fea9645fca`](https://github.com/sondr3/git-anger-management/commit/fea9645fca)] - Update metadata for docs.rs build, release v0.8.1
- [[`b2fc2fcd58`](https://github.com/sondr3/git-anger-management/commit/b2fc2fcd58)] - Update README, CHANGELOG

## v0.8.0 git-anger-lib

> 2020-05-13
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "git-anger-library"
version = "0.8.0"
version = "0.8.1"
edition = "2018"
authors = ["Sondre Nilsen <nilsen.sondre@gmail.com>"]
description = "Count your naughty words in git commit messages"
Expand All @@ -22,4 +22,7 @@ serde_json = { version = "1.0", optional = true }
[features]
default = []
json = ["serde", "serde_json"]
table = ["tabwriter"]
table = ["tabwriter"]

[package.metadata.docs.rs]
features = [ "json", "table" ]
71 changes: 19 additions & 52 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,67 +1,34 @@
//! # git-anger-management
//! # git-anger-library
//! [![pipeline](https://github.com/sondr3/git-anger-management/workflows/pipeline/badge.svg)](https://github.com/sondr3/git-anger-management/actions)
//! [![Crates.io](https://img.shields.io/crates/v/git-anger-management.svg)](https://crates.io/crates/git-anger-management)
//! [![Docs.rs](https://docs.rs/git-anger-management/badge.svg)](https://docs.rs/crate/git-anger-management/)
//! [![Crates.io](https://img.shields.io/crates/v/git-anger-library.svg)](https://crates.io/crates/git-anger-library)
//! [![Docs.rs](https://docs.rs/git-anger-library/badge.svg)](https://docs.rs/crate/git-anger-library/)
//!
//! ## What
//!
//! Have you ever wondered just how angry your co-workers and/or yourself are? Or
//! just how _naughty_ the commit log for a project is? Worry no more,
//! `git-anger-management` is here to help you. Simply run it against your
//! repository and it'll tell you who is the naughtiest of them all.
//! This is the main library that drives the
//! [`git-anger-management`](https://crates.io/crates/git-anger-management)
//! CLI-application, this is not really useful for anything besides that... but if
//! you for some reason want to, feel free!
//!
//! [![asciicast](https://asciinema.org/a/329563.svg)](https://asciinema.org/a/329563)
//! ## Features:
//!
//! ## Why
//! **Note:** None of these features are enabled by default, so you have to opt into
//! it like so:
//!
//! We all have those moments where we finally figured out why something was utterly
//! broken, wrong or both and then had nowhere to scream but to our git commit. I do
//! it all the time, and I wanted to know just how angry I am at my code.
//!
//! # Installation
//!
//! There are two possible ways to install the binary for this:
//!
//! 1. Installation via `cargo`. For this you need to have installed (I recommend
//! installing via [rustup](https://rustup.rs/)), then run `cargo install
//! git-anger-management`. As long as you have `~/.cargo/bin` in your `$PATH` you
//! can now use this program by running it in your terminal.
//! 2. Download the correct binary from the
//! [releases](https://github.com/sondr3/git-anger-management/releases), extract
//! it and copy the file to somewhere on your \$PATH and make it executable:
//! `chmod +x git-anger-management`.
//!
//! ## Usage
//!
//! Simply run the command `git anger-management` and you should get some output
//! that looks something like this:
//!
//! ```sh
//! $ git anger-management
//! Author bitch bloody damn fuck fucking shitty Total
//! ------ ----- ------ ---- ---- ------- ------ -----
//! John Doe 0 1 1 0 0 0 2
//! Ola Nordmann 1 0 0 0 1 0 2
//! Sondre Nilsen 0 0 0 1 1 1 3
//! ------ ----- ------ ---- ---- ------- ------ -----
//! Overall 1 1 1 1 2 1 7
//! ```toml
//! [dependencies]
//! git-anger-library = { version = "0.8.0", features=["table", "json"] }
//! ```
//!
//! You can also look in other directories if you want to look somwhere else but
//! you're too lazy to actually `cd` into that directory. Finally, you can also
//! print the output as JSON if you want to further manipulate the data by adding
//! the `-j/--json` flag to the binary:
//!
//! ```sh
//! $ git anger-management --json
//! {"name":"repo","total_commits":5,"total_curses":7,"curses":{"bloody":1,"shitty":1,"fuck":1,"bitch":1,"damn":1,"fucking":2},"authors":{"Sondre Nilsen":{"name":"Sondre Nilsen","total_commits":3,"total_curses":3,"curses":{"shitty":1,"fucking":1,"fuck":1}},"Ola Nordmann":{"name":"Ola Nordmann","total_commits":1,"total_curses":2,"curses":{"bitch":1,"fucking":1}},"John Doe":{"name":"John Doe","total_commits":1,"total_curses":2,"curses":{"damn":1,"bloody":1}}}}⏎
//! ```
//! - `json`: Enables Serde serialization of the processed data using with the
//! `print_json()` method.
//! - `table`: Enables pretty printing of the processed data using TabWriter with
//! the function `print_table()`.
//!
//! Finally, you can also look at the help by running `git anger-management -h` for more options.
//!
//! # License
//! ## License
//!
//! GPLv3 or later.
//!
/// A git author
pub mod author;
/// Core algorithms and functionality
Expand Down

0 comments on commit 152b5cb

Please sign in to comment.