Skip to content
cady-bPublic

About

★ ☃ ★

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

My Advent of Code things for 2024!

Click to see the source

Usage:

  1. Register with Advent of Code
  2. Using Dev-Tools, find your session cookie (cookie-store or in network requests. Your token should have the form of a 128 charater long alphanumeric string | Note: since it's HttpOnly, it can't be accessed via Document.cookie)
  3. Save the string in .cookie

alternative methods / running my solutions without a token

  • It is fairly simple to manually populate ./aoccache/. The structure of currently required information in this directory is:
    • year/ (e.g., 2024, 15 (this is != 2015), 8798432 (please don't try anything BCE))
      • dd/ (e.g., 01, 08, 24)
        • input (basically a .txt file without an extension; UTF-8)
  • The code for individual days is also quite modular. In cady_does_aoc/src/days/, every day has a file dxx.rs, with public solver functions solver_[a/b](input: &str) -> AocResult for each part (provided they are finished). They produce the solution String in the result's Ok variant.
    This is exported to main via the days module in the form of the individual submodules (e.g., d01, d08, d24).
    In addition to the public solvers, each submodule also exports PROBLEM (a static Problem struct), whose associated solve_standalone(&str) function runs both solvers, printing the results to stdout / errors to stderr.

Adherence to Automation guidelines

We try our best to adhere to the automation guidelines outlined in r/adventofcode/wiki/faqs/automation. Specifically:

  • Inputs are cached, we don't submit anything (at the moment)
  • // TODO: Outbound calls are throttled to every x minutes in []
    Once inputs are downloaded, they are cached locally (aoc_plumbing/src/aocapi/request.rs, cached_request())
  • The User-Agent header for all requests to AoC contains the maintainers e-mail address, as well as the URL of this repository (aoc_plumbing/src/aocapi/mod.rs, APP_USER_AGENT)

About

★ ☃ ★

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages