From b1149487c510d2423268545a6c0775502e62248a Mon Sep 17 00:00:00 2001 From: Peter Anning <22272449+peteanning@users.noreply.github.com> Date: Sun, 6 Nov 2022 09:30:19 +0000 Subject: [PATCH 1/6] docs: fix leftover occurence of `cargo day` (#3) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8883d5..0c04d13 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ cargo scaffold # Created empty input file "src/inputs/01.txt" # Created empty example file "src/examples/01.txt" # --- -# 🎄 Type `cargo day 01` to run your solution. +# 🎄 Type `cargo solve 01` to run your solution. ``` Individual solutions live in the `./src/bin/` directory as separate binaries. From e1a4fa6657d2606c1b4ebdf5605d9fb0c56b785f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sp=C3=B6ttel?= <1682504+fspoettel@users.noreply.github.com> Date: Sun, 6 Nov 2022 11:05:31 +0100 Subject: [PATCH 2/6] docs: improve footnote formatting --- README.md | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 0c04d13..f0ed6f4 100644 --- a/README.md +++ b/README.md @@ -142,13 +142,10 @@ cargo clippy ### Download puzzle inputs via aoc-cli 1. Install [`aoc-cli`](https://github.com/scarvalhojr/aoc-cli/) via cargo: `cargo install aoc-cli`. -2. Create an `.adventofcode.session` file in your home directory and paste your session cookie 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. +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. Once installed, you can use the [download command](#download-inputs-for-a-day). -> **Note** -> The session cookie might expire after a while (~1 month) which causes the downloads to fail. To fix this issue, refresh the `.adventofcode.session` file. - ### Enable clippy lints in CI Uncomment the `clippy` job in the `ci.yml` workflow to enable clippy checks in CI. @@ -170,19 +167,14 @@ Go to the _Secrets_ tab in your repository settings and create the following sec - `AOC_ENABLED`: This variable controls whether the workflow is enabled. Set it to `true` to enable the progress tracker. - `AOC_USER_ID`: Go to [this page](https://adventofcode.com/settings) and copy your user id. It's the number behind the `#` symbol in the first name option. Example: `3031` - `AOC_YEAR`: the year you want to track. Example: `2021` -- `AOC_SESSION`: an active session for the advent of code website. 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. - -> **Note** -> The session cookie might expire after a while (~1 month) which causes the automated workflow to fail. To fix this issue, refresh the `AOC_SESSION` secret. +- `AOC_SESSION`: an active session[^2] for the advent of code website. 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. ### Use VS Code to debug your code 1. Install [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) and [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb). - 2. Set breakpoints in your code. [^1] - 3. Click _Debug_ next to the unit test or the _main_ function. [^2] - 4. The debugger will halt your program at the specific line and allow you to inspect the local stack. [^3] - ---- + 2. Set breakpoints in your code. [^3] + 3. Click _Debug_ next to the unit test or the _main_ function. [^4] + 4. The debugger will halt your program at the specific line and allow you to inspect the local stack. [^5] ## Useful crates @@ -198,6 +190,8 @@ Do you have aoc-specific crate recommendations? [Share them!](https://github.com ## Footnotes -[^1]: Set a breakpoint -[^2]: Run debugger -[^3]: Inspect debugger state +[^1]:The session cookie might expire after a while (~1 month) which causes the downloads to fail. To fix this issue, refresh the `.adventofcode.session` file. +[^2]: The session cookie might expire after a while (~1 month) which causes the automated workflow to fail. To fix this issue, refresh the AOC_SESSION secret. +[^3]: Set a breakpoint +[^4]: Run debugger +[^5]: Inspect debugger state From 66ca5907f9c7bd7b053a25253fbfb87baf9cc5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sp=C3=B6ttel?= <1682504+fspoettel@users.noreply.github.com> Date: Sun, 6 Nov 2022 11:06:06 +0100 Subject: [PATCH 3/6] docs: typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0ed6f4..416ef49 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,7 @@ Do you have aoc-specific crate recommendations? [Share them!](https://github.com ## Footnotes -[^1]:The session cookie might expire after a while (~1 month) which causes the downloads to fail. To fix this issue, refresh the `.adventofcode.session` file. +[^1]: The session cookie might expire after a while (~1 month) which causes the downloads to fail. To fix this issue, refresh the `.adventofcode.session` file. [^2]: The session cookie might expire after a while (~1 month) which causes the automated workflow to fail. To fix this issue, refresh the AOC_SESSION secret. [^3]: Set a breakpoint [^4]: Run debugger From 24ea1ba3a18a18909af3869e65d978a1fbf957c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sp=C3=B6ttel?= <1682504+fspoettel@users.noreply.github.com> Date: Sun, 6 Nov 2022 11:07:10 +0100 Subject: [PATCH 4/6] chore: bump version --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 491de10..431dbd0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "aoc" -version = "0.6.1" +version = "0.6.2" dependencies = [ "pico-args", ] diff --git a/Cargo.toml b/Cargo.toml index 3f10bd0..8811c3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aoc" -version = "0.6.1" +version = "0.6.2" authors = ["Felix Spöttel <1682504+fspoettel@users.noreply.github.com>"] edition = "2021" default-run = "aoc" From f6b75e38a5de2a8bb098c2f21af9189bf6316075 Mon Sep 17 00:00:00 2001 From: Peter Anning <22272449+peteanning@users.noreply.github.com> Date: Sun, 6 Nov 2022 11:00:21 +0000 Subject: [PATCH 5/6] docs: fix broken internal link to aoc-cli setup (#5) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 416ef49..7c66a56 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ When editing a solution, `rust-analyzer` will display buttons for running / debu ### Download input for a day > **Note** -> This command requires [installing the aoc-cli crate](#download-inputs-via-aoc-cli). +> This command requires [installing the aoc-cli crate](#download-puzzle-inputs-via-aoc-cli). ```sh # example: `cargo download 1` From 840d617dde3ebda287179e699473d0d1d9cfd0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sp=C3=B6ttel?= <1682504+fspoettel@users.noreply.github.com> Date: Sun, 6 Nov 2022 12:02:15 +0100 Subject: [PATCH 6/6] docs: fix internal link to download command --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c66a56..39d1556 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ cargo clippy 1. Install [`aoc-cli`](https://github.com/scarvalhojr/aoc-cli/) via cargo: `cargo install aoc-cli`. 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. -Once installed, you can use the [download command](#download-inputs-for-a-day). +Once installed, you can use the [download command](#download-input-for-a-day). ### Enable clippy lints in CI