|
1 | 1 | <imgsrc="./.assets/christmas_ferris.png"width="164"> |
2 | 2 |
|
3 | | -#🎄 Advent of Code {year} |
| 3 | +#🎄 Advent of Code |
4 | 4 |
|
5 | 5 | Solutions for[Advent of Code](https://adventofcode.com/) in[Rust](https://www.rust-lang.org/). |
6 | 6 |
|
@@ -201,6 +201,28 @@ cargo today |
201 | 201 | # ...the input... |
202 | 202 | ``` |
203 | 203 |
|
| 204 | +###➡️ Change year |
| 205 | + |
| 206 | +You can use the`switch-year` command to navigate through years. |
| 207 | + |
| 208 | +The files of the year defined in the environment variable`AOC_YEAR` in`.cargo/config.toml` are as usual in`src/` and`data/` folders, while the others are stored in`years/{AOC_YEAR}/`. Benchmarks on the readme are automatically updated. |
| 209 | + |
| 210 | +```sh |
| 211 | +# example: `cargo switch-year 2015` with no files already written for 2015 |
| 212 | +cargo switch-year 2015 |
| 213 | + |
| 214 | +# output: |
| 215 | +# No existing files for year 2015, generating blank folders. |
| 216 | +# --- |
| 217 | +# 🎄 Successfully switched to year 2015. |
| 218 | +``` |
| 219 | + |
| 220 | +>[!TIP] |
| 221 | +>Remember to switch to the last event year before doing any commits on your personal repo, or else you will have many files changes as there were moved during year switches. |
| 222 | +
|
| 223 | +>Please note that[stars tracking](#automatically-track-️-progress-in-the-readme) will still track the year you specified in the GitHub action and will not be changed. |
| 224 | +
|
| 225 | + |
204 | 226 | ###➡️ Format code |
205 | 227 |
|
206 | 228 | ```sh |
|