Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/durocodes/audit
a tool to validate advent of code solutions
https://github.com/durocodes/audit
advent-of-code aoc
Last synced: about 1 month ago
JSON representation
a tool to validate advent of code solutions
- Host: GitHub
- URL: https://github.com/durocodes/audit
- Owner: DuroCodes
- Created: 2024-11-27T04:06:17.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-27T19:06:41.000Z (about 1 month ago)
- Last Synced: 2024-11-27T19:46:52.974Z (about 1 month ago)
- Topics: advent-of-code, aoc
- Language: Rust
- Homepage: https://crates.io/crates/audit-cli
- Size: 193 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Audit
Audit is a CLI tool that helps you validate and refactor your [advent of code](https://adventofcode.com/) solutions. Supports any language, and can be used as a pipe.
> [!WARNING]
> Audit doesn't download inputs or check your answers on advent of code; it's used to refactor your code once you've came up with an initial solution.## Installation
You can use `cargo install audit-cli` to install the CLI tool on your system, with the `aud` alias (given you have Rust installed)
## Usage
1. Create a configuration file in your project (default: `.audit.toml`)
2. Make sure your advent of code solutions print to the standard output, such as:```
Day 1
Part 1: 123
Part 2: 456
```4. Run `aud` with your advent of code program, such as `aud python day1.py`
> [!TIP]
> You can also pass `aud` as a pipe, such as `python day1.py | aud`### Configuration
You can specify a custom configuration path with the `-c/--config` flag, such as `python day1.py | aud -c audit.toml`
```toml
"$schema" = "https://raw.githubusercontent.com/durocodes/audit/main/schema.json" # <- optional editor support[[solutions]]
day = 1
part1 = "123"
part2 = "456"[[solutions]]
day = 2
part1 = "789"
part2 = "012"# ...
```## Example
You can find a minimal example in the `example` directory, which contains a Python "solution" and a configuration file.
The example can be run with `python runner.py | aud` (make sure you're in the `example` directory)