You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ This template supports all major OS (macOS, Linux, Windows).
17
17
1. Open [the template repository](https://github.com/fspoettel/advent-of-code-rust) on Github.
18
18
2. Click [Use this template](https://github.com/fspoettel/advent-of-code-rust/generate) and create your repository.
19
19
3. Clone your repository to your computer.
20
+
4. If you are solving a previous year's aoc and want to use the `aoc-cli` integration, change the `AOC_YEAR` variable in `.cargo/config.toml` to reflect that.
20
21
21
22
### Setup rust 💻
22
23
@@ -71,8 +72,6 @@ cargo download <day>
71
72
# 🎄 Successfully wrote puzzle to "src/puzzles/01.md".
72
73
```
73
74
74
-
To download inputs for previous years, append the `--year/-y` flag. _(example: `cargo download 1 --year 2020`)_
75
-
76
75
Puzzle descriptions are stored in `src/puzzles` as markdown files. Puzzle inputs are not checked into git. [Reasoning](https://old.reddit.com/r/adventofcode/comments/k99rod/sharing_input_data_were_we_requested_not_to/gf2ukkf/?context=3).
77
76
78
77
### Run solutions for a day
@@ -96,6 +95,13 @@ cargo solve <day>
96
95
97
96
Displayed _timings_ show the raw execution time of your solution without overhead (e.g. file reads).
98
97
98
+
#### Submitting solutions
99
+
100
+
> **Note**
101
+
> This requires [installing the aoc-cli crate](#download-puzzle-inputs-via-aoc-cli).
102
+
103
+
In order to submit part of a solution for checking, append the `--submit <part>` option to the `solve` command.
104
+
99
105
### Run all solutions
100
106
101
107
```sh
@@ -140,6 +146,7 @@ cargo fmt
140
146
```sh
141
147
cargo clippy
142
148
```
149
+
## Optional template features
143
150
144
151
### Read puzzle description in terminal
145
152
@@ -156,13 +163,9 @@ cargo read <day>
156
163
# ...the input...
157
164
```
158
165
159
-
To read inputs for previous years, append the `--year/-y` flag. _(example: `cargo read 1 --year 2020`)_
160
-
161
-
## Optional template features
162
-
163
166
### Download puzzle inputs via aoc-cli
164
167
165
-
1. Install [`aoc-cli`](https://github.com/scarvalhojr/aoc-cli/) via cargo: `cargo install aoc-cli --version 0.7.0`
168
+
1. Install [`aoc-cli`](https://github.com/scarvalhojr/aoc-cli/) via cargo: `cargo install aoc-cli --version 0.12.0`
166
169
2. Create an `.adventofcode.session` file in your home directory and paste your session cookie[^1] into it. To get this, press F12 anywhere on the Advent of Code website to open your browser developer tools. Look in your Cookies under the Application or Storage tab, and copy out the `session` cookie value.
167
170
168
171
Once installed, you can use the [download command](#download-input--description-for-a-day).
0 commit comments