![Image]

# `changelogging`

[![License][License Badge]][License]
[![Version][Version Badge]][Package]
[![Downloads][Downloads Badge]][Package]
[![Discord][Discord Badge]][Discord]
[![Test][Test Badge]][Actions]

> *Building changelogs from fragments.*

## Installing

Installing the crate with `cargo` is quite simple:

```console
$ cargo install changelogging
```

Alternatively, the crate can be installed from source:

```console
$ cargo install --git https://github.com/nekitdev/changelogging.git
```

Or via cloning the repository:

```console
$ git clone https://github.com/nekitdev/changelogging.git
$ cd changelogging
$ cargo install --path .
```

The binaries can be downloaded from [releases][Releases].

## Example

Once `changelogging` is installed, we can start building changelogs!

First things first, we need to configure the *context* of the project.

Create `changelogging.toml` and add the *name*, *version* and *URL* of the project:

```toml
[context]
name = "changelogging"
version = "0.2.2"
url = "https://github.com/nekitdev/changelogging"
```

Then we need to create the `changes` directory.

```console
$ mkdir changes
```

Now we can add *fragments*:

```console
$ changelogging create --content "Added cool features!" 13.feature.md
$ changelogging create --content "Fixed annoying bugs!" 64.fix.md
```

And finally, preview the changelog entry!

```console
$ changelogging preview
## 0.2.2 (YYYY-MM-DD)

### Features

- Added cool features! (#13)

### Fixes

- Fixed annoying bugs! (#64)
```

Then let us add our `CHANGELOG.md` file with the following content:

```md
# Changelog

<!-- changelogging: start -->
```

Note that the `start` is essential if we want to add some content before the changelog entries.

Assuming the preview is what we expected it to be, writing it to the changelog is as simple as:

```console
$ changelogging build
```

Finally, let's see the changelog:

```console
$ cat CHANGELOG.md
# Changelog

<!-- changelogging: start -->

## 0.2.2 (YYYY-MM-DD)

### Features

- Added cool features! (#13)

### Fixes

- Fixed annoying bugs! (#64)
```

## Documentation

You can find the documentation [here][Documentation].

## Support

If you need support with the library, you can send an [email][Email]
or refer to the official [Discord server][Discord].

## Changelog

You can find the changelog [here][Changelog].

## Security Policy

You can find the Security Policy of `changelogging` [here][Security].

## Contributing

If you are interested in contributing to `changelogging`, make sure to take a look at the
[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct].

## License

`changelogging` is licensed under the MIT License terms. See [License][License] for details.

[Image]: https://github.com/nekitdev/changelogging/blob/main/changelogging.svg?raw=true

[Email]: mailto:support@nekit.dev

[Discord]: https://nekit.dev/chat

[Actions]: https://github.com/nekitdev/changelogging/actions
[Releases]: https://github.com/nekitdev/changelogging/releases

[Changelog]: https://github.com/nekitdev/changelogging/blob/main/CHANGELOG.md
[Code of Conduct]: https://github.com/nekitdev/changelogging/blob/main/CODE_OF_CONDUCT.md
[Contributing Guide]: https://github.com/nekitdev/changelogging/blob/main/CONTRIBUTING.md
[Security]: https://github.com/nekitdev/changelogging/blob/main/SECURITY.md

[License]: https://github.com/nekitdev/changelogging/blob/main/LICENSE

[Package]: https://crates.io/crates/changelogging
[Documentation]: https://docs.rs/changelogging

[Discord Badge]: https://img.shields.io/discord/728012506899021874
[License Badge]: https://img.shields.io/crates/l/changelogging
[Version Badge]: https://img.shields.io/crates/v/changelogging
[Downloads Badge]: https://img.shields.io/crates/dr/changelogging
[Test Badge]: https://github.com/nekitdev/changelogging/workflows/test/badge.svg
