chore: simplify README.md
This commit is contained in:
		
							
								
								
									
										96
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										96
									
								
								README.md
									
									
									
									
									
								
							@@ -4,84 +4,32 @@
 | 
			
		||||
# Advent-of-Code {YEAR}
 | 
			
		||||
*This is a dumbed down version of [fspoettel/advent-of-code-rust](https://github.com/fspoettel/advent-of-code-rust) with some extra features*
 | 
			
		||||
 | 
			
		||||
## CLI
 | 
			
		||||
### Prepare
 | 
			
		||||
## Project overview
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
# example: `cargo prepare 1`
 | 
			
		||||
cargo prepare <day>
 | 
			
		||||
### Project structure
 | 
			
		||||
- `src/` :
 | 
			
		||||
    - `bin/`:
 | 
			
		||||
        - `<day>.rs`: solution files 
 | 
			
		||||
        - `*.rs`: convenience scripts
 | 
			
		||||
    - `inputs/`: this directory is gitignored, input files go here
 | 
			
		||||
    - `test_inputs/`: example files go here; you can push this as test are run in ci
 | 
			
		||||
    - `helpers.rs`: helper functions you can reuse in solution files go here
 | 
			
		||||
    - `lib.rs`: contains framework code
 | 
			
		||||
    - `main.rs`: contains framework code
 | 
			
		||||
- `.env.example`: example dotenv file
 | 
			
		||||
 | 
			
		||||
# output:
 | 
			
		||||
# Created module "src/bin/01.rs"
 | 
			
		||||
# Created empty input file "src/inputs/01.txt"
 | 
			
		||||
# Created empty example file "src/examples/01.txt"
 | 
			
		||||
# ---
 | 
			
		||||
# 🎄 Type `cargo solve 01` to run your solution.
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Download input
 | 
			
		||||
prepare `.env` file
 | 
			
		||||
```
 | 
			
		||||
cp .env.example .env
 | 
			
		||||
```
 | 
			
		||||
set `YEAR` to whichever year you are solving for and `TOKEN` to AoC session Cookie.
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
# example: `cargo download 1`
 | 
			
		||||
cargo download <day>
 | 
			
		||||
 | 
			
		||||
# output:
 | 
			
		||||
# Downloaded input file "src/inputs/01.txt"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Solve
 | 
			
		||||
```sh
 | 
			
		||||
# example: `cargo solve 01`
 | 
			
		||||
cargo solve <day>
 | 
			
		||||
 | 
			
		||||
# output:
 | 
			
		||||
#     Running `target/debug/01`
 | 
			
		||||
# 🎄 Part 1 🎄
 | 
			
		||||
#
 | 
			
		||||
# 6 (elapsed: 37.03µs)
 | 
			
		||||
#
 | 
			
		||||
# 🎄 Part 2 🎄
 | 
			
		||||
#
 | 
			
		||||
# 9 (elapsed: 33.18µs)
 | 
			
		||||
```
 | 
			
		||||
Displayed timings show the raw execution time of your solution without overhead (e.g. file reads). To run an optimized version for benchmarking, append the `--release` flag.
 | 
			
		||||
### Cli
 | 
			
		||||
- `cargo prepare <day>`: prepare solution files for `day`
 | 
			
		||||
- `cargo download <day>`: download input file for `day`
 | 
			
		||||
- `cargo solve <day>`: run solution against input for `day`
 | 
			
		||||
- `cargo all`: alias for run; runs solutions for all days
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Solve all
 | 
			
		||||
### dotenv
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
cargo all
 | 
			
		||||
set `YEAR` to whichever year you are solving for and `TOKEN` to AoC session Cookie
 | 
			
		||||
 | 
			
		||||
# output:
 | 
			
		||||
#     Running `target/release/aoc`
 | 
			
		||||
# ----------
 | 
			
		||||
# | Day 01 |
 | 
			
		||||
# ----------
 | 
			
		||||
# 🎄 Part 1 🎄
 | 
			
		||||
#
 | 
			
		||||
# 0 (elapsed: 170.00µs)
 | 
			
		||||
#
 | 
			
		||||
# 🎄 Part 2 🎄
 | 
			
		||||
#
 | 
			
		||||
# 0 (elapsed: 30.00µs)
 | 
			
		||||
# <...other days...>
 | 
			
		||||
# Total: 0.20ms
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
`all` is an alias for `cargo run`. To run an optimized version for benchmarking, append the `--release` flag.
 | 
			
		||||
 | 
			
		||||
### Run against test inputs
 | 
			
		||||
run all solutions
 | 
			
		||||
```sh
 | 
			
		||||
cargo test
 | 
			
		||||
```
 | 
			
		||||
run for a given day
 | 
			
		||||
```sh
 | 
			
		||||
cargo test --bin <day>
 | 
			
		||||
```
 | 
			
		||||
### FAQ
 | 
			
		||||
 | 
			
		||||
#### How are your commits numbered in ascending order?
 | 
			
		||||
[https://westling.dev/b/extremely-linear-git](https://westling.dev/b/extremely-linear-git)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user