An open API service indexing awesome lists of open source software.

https://github.com/notgnoshi/herostratus

An ancient Greek known for seeking fame through crime and destruction. Also a Git repository achievements engine.
https://github.com/notgnoshi/herostratus

achievements git git-achievements measure-what-matters sarcasm

Last synced: 2 months ago
JSON representation

An ancient Greek known for seeking fame through crime and destruction. Also a Git repository achievements engine.

Awesome Lists containing this project

README

          

# Herostratus

![lint workflow](https://github.com/Notgnoshi/herostratus/actions/workflows/lint.yml/badge.svg?event=push)
![release workflow](https://github.com/Notgnoshi/herostratus/actions/workflows/release.yml/badge.svg?event=push)
![code coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Notgnoshi/b20aa388c90ca92aba6aa37ec55a7f12/raw/herostratus-coverage.json)

**Herostratus** _n._ **1.** An [ancient Greek](https://en.wikipedia.org/wiki/Herostratus) known for
seeking fame through crime and destruction. **2.** A Git repository achievements engine.

Inspired by .

## Usage

### Trying it out

```sh
git clone git@github.com:Notgnoshi/herostratus.git
cd herostratus
cargo run --release -- check .
cargo run --release -- check . origin/test/fixup
```

The `check` subcommand is stateless. It reads/writes no configuration, and can not fetch from the
upstream remote. Read on for stateful configuration that enables running and re-running Herostratus
on a group of repositories.

> [!TIP]
>
> `--release` builds are recommended for significantly better performance!

### Setting it up

The following example configures Herostratus to run on its own
[test/simple](https://github.com/Notgnoshi/herostratus/tree/test/simple) and
[test/fixup](https://github.com/Notgnoshi/herostratus/tree/test/fixup) branches.

```sh
# Configure Herostratus to track two branches of its own repository
$ herostratus add git@github.com:Notgnoshi/herostratus.git test/simple
$ herostratus add git@github.com:Notgnoshi/herostratus.git test/fixup
# Check all configured branches for achievements
$ herostratus check-all
# Generate a static HTML site with the granted achievements
$ herostratus render
$ xdg-open ./public/index.html
```

These commands write their configuration and clone Git repositories to `~/.local/share/herostratus/`
by default. See `herostratus --help` for more options.

### What achievements are there?

See [RULES.md](RULES.md) for a list of achievements.

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md) and [quickstart.md](docs/developer/quickstart.md), as well as
the [ARCHITECTURE.md](ARCHITECTURE.md).

## Benchmarks

| Name | # Commits | # Achievements | Time | Time per commit |
| ----------- | --------- | -------------- | ------- | --------------- |
| git | 80667 | 413 | 36.71s | 455.07µs |
| herostratus | 492 | 4 | 81.67ms | 165.99µs |