Scala version of the python library by the same name.
Requires Mill 0.9.3.
I haven't publish on maven yet, so it will need to be published locally:
git clone https://github.com/bbstilson/advent-of-code-data.git
cd advent-of-code-data
mill aocd.publishLocalIt's ready to use!
Add it to your library deps:
ivy"io.github.bbstilson::aocd:0.1.0" // mill
"io.github.bbstilson" %% "aocd" % "0.1.0" // sbtExport your session token, which can be found in your browser cookies after authenticating on the Advent of Code site.
export AOC_SESSION_TOKEN="whateveritis"Now go solve the problem!
import aocd.Problem
object Day1 extends Problem(2020, 1) {
def run(input: List[String]): Unit = {
// you can do it!
}
}Your data is downloaded to ~/.aocd/<YYYY>/<DD>/input.txt. The download is only done once, subsequent runs will just read the data from that directory.