-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from StreakInTheSky/go-install-aoc
Go install aoc
- Loading branch information
Showing
9 changed files
with
65 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,32 @@ | ||
# adventofcode-fetcher | ||
Fetches inputs from Advent Of Code events | ||
CLI command that fetches inputs for Advent Of Code event puzzles | ||
|
||
## Installation | ||
### go install | ||
``` | ||
go install github.com/streakinthesky/adventofcode-fetcher/aoc | ||
``` | ||
|
||
## To Use | ||
Log into (Advent Of Code)[https://adventofcode.com] and grab the value of the cookie named `session` with your browser's dev tools([for chrome](https://developer.chrome.com/docs/devtools/storage/cookies/)). | ||
|
||
You can copy and paste the value in a file called `session` in the current directory. It must be the raw value on the first line of the file. Then use the `aoc` command with the url of the puzzle inputs you want to fetch: | ||
``` | ||
aoc fetch https://adventofcode.com/2022/day/1 | ||
``` | ||
|
||
OR | ||
|
||
You can pass it directly into the command using the `-session` flag (ie. the session value is 1234567890abcdef) | ||
``` | ||
aoc fetch --session=1234567890abcdef https://adventofcode.com/2022/day/1 | ||
``` | ||
|
||
OR | ||
|
||
You can save it in any file and pass the file path into the `-session` flag (ie. saved in a file `../path/to/file`) | ||
``` | ||
aoc fetch --session ../path/to/file https://adventofcode.com/2022/day/1 | ||
``` | ||
|
||
These will save the inputs for the event in a file called `inputs.txt` in the current directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/streakinthesky/adventofcode-fetcher/aoc | ||
|
||
go 1.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.