aoc-util.tools

Tools to make Advent of Code work with the repl You can submit, retrieve and read the puzzle

By default it tries to infer the current puzzle to use, from the namespace e.g. se.2020.day2 Year: 2020 Day: 2

Puzzle inputs are stored resources/puzzle/{YEAR}/{DAY}.txt Inputs are cached and reused as they never change

Puzzle descriptions are stored resources/puzzle/{YEAR}/{DAY}.md

-downloadDescription

(-downloadDescription ns)

-downloadPuzzle

(-downloadPuzzle year day)

-get

(-get ns)

-open

(-open ns)

-parseNS

(-parseNS ns)

-submit

(-submit puzzle-id part answer)

create-next-day

(create-next-day)(create-next-day ns)

Creates the next Advent of Code day

download-description

(download-description)(download-description ns)

Download puzzle description

download-examples

(download-examples)(download-examples ns)

download-puzzle

(download-puzzle year day)

Puzzle id year/day

get!

(get!)(get! parser)(get! ns parser)(get! year day parser)

defaults to current namespace default parser identity

open-browser

(open-browser)(open-browser ns)

Opens the problem with the default browser

parse-input

(parse-input s)(parse-input s parser)

Like get! but for strings, helps to use the examples from the puzzle-description

parse-ns

(parse-ns ns)

set-session-cookie!

(set-session-cookie! cookie)

Write your session cookie to the right file, for later use

submit!

(submit! part answer)(submit! year day part answer)(submit! puzzle-id part answer)

Takes the namespace {ns}.{year}.day{x}, which part 1 2 and the answer

submit-first!

(submit-first! answer)

submit-second!

(submit-second! answer)