Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/al-ce/aocgofetch
CLI tool for fetching Advent of Code puzzle input
https://github.com/al-ce/aocgofetch
advent-of-code
Last synced: 2 days ago
JSON representation
CLI tool for fetching Advent of Code puzzle input
- Host: GitHub
- URL: https://github.com/al-ce/aocgofetch
- Owner: al-ce
- License: gpl-3.0
- Created: 2024-11-30T01:14:13.000Z (27 days ago)
- Default Branch: main
- Last Pushed: 2024-12-01T19:01:02.000Z (25 days ago)
- Last Synced: 2024-12-24T00:56:02.567Z (3 days ago)
- Topics: advent-of-code
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aocgofetch
Fetches Advent of Code puzzle inputs and prints to standard out.
![screenshot](https://github.com/user-attachments/assets/eeee3242-2717-43e6-b456-3c52835d4882)
## Installation
Install with go >= 1.17
```bash
go install github.com/al-ce/aocgofetch@latest
```Or clone this repository and build with `go build -o `.
This project uses [joho/gotodenv](https://github.com/joho/godotenv) as a dependency.
## Usage
### Authenticate
Authenticate yourself at `adventofcode.com` and get the value for the `session` cookie from your browser.
- Firefox: `Developer Tools > Storage > Cookies`
- Chrome: `Developer Tools > Application > Cookies`Add that value to an `AOC_SESSION` key to a `.env` file at the root of your working directory, like your directory where you're writing your puzzle-solvers.
```bash
AOC_SESSION="yourCookieValue"
```### Check your `.gitignore`
***WARNING:*** make sure you add the `.env` to your `.gitignore` if you're backing up your files to a remote repository!
***Reminder:*** please respect the author and do not include the puzzle text or the puzzle input in your repository.
### Run the program
Give the year (2015-present) and day (1-25) as arguments.
The puzzle input will print to `stdout`:```bash
❯ aocgofetch 2015 4
ckczppom
```