Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fstaudt/advent-of-code
Solutions for Advent of Code
https://github.com/fstaudt/advent-of-code
advent-of-code aoc-2023 aoc-2023-in-kotlin
Last synced: about 4 hours ago
JSON representation
Solutions for Advent of Code
- Host: GitHub
- URL: https://github.com/fstaudt/advent-of-code
- Owner: fstaudt
- Created: 2023-12-01T17:16:14.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-11-06T17:42:10.000Z (11 days ago)
- Last Synced: 2024-11-06T18:35:33.596Z (10 days ago)
- Topics: advent-of-code, aoc-2023, aoc-2023-in-kotlin
- Language: Kotlin
- Homepage:
- Size: 377 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# advent-of-code
## Solutions
- [2023](aoc2023/src/main/kotlin/com/github/fstaudt/aoc2023)
## Gradle tasks
### Leaderboard slope chart
generate a slope chart for a private leaderboard
#### How-to
- clone repository
- store Advent of Code `Cookie` request header in file `cookie.txt`
- run command:
``` shell
./gradlew leaderboardSlopeChart --year= --id= [--top=] [--force] \
[--from=] [--until=] [--final]
```
- `year`: year of advent calendar
- `id`: ID of private leaderboard
- `top`: number of top members displayed in slope chart
- `force`: force download of leaderboard JSON\
_By default, download is skipped if file `build/aoc/leaderboards//.json` already exists._\
:warning: _Please don't make frequent automated requests to Advent of code API._\
:warning: _Avoid download of leaderboard JSON more often than once every 15 minutes (900 seconds)._
- `from`: first day displayed in slope chart (default: 1)
- `until`: last day displayed in slope chart (default: 25)
- `min`: minimum required number of appearances in top for members not in top on last day (default: 2)
- `final`: include final ranking in slope chart- Slope chart is generated in `build/aoc/leaderboards//.json.png`
#### Example
``` shell
./gradlew leaderboardSlopeChart --year=2023 --id=12345 --top=10 # example uses a fake id
```![Leaderboard slope chart](./examples/12345.png)
### Init day
generate base sources for requested day
#### How-to
- clone repository
- run command:
``` shell
./gradlew initDay [--day=] [--year=] [--force]
```
- `day`: day in advent calendar (defaults to current day of month)
- `year`: year of advent calendar (defaults to current year)
- `force`: overwrite existing sources### Fetch day input
fetch input of current user for requested day
#### How-to
- clone repository
- store Advent of Code `Cookie` request header in file `cookie.txt`
- run command:
``` shell
./gradlew fetchDayInput [--day=] [--year=]
```
- `day`: day in advent calendar (defaults to current day of month)
- `year`: year of advent calendar (defaults to current year)