Crate raoc

Source
Expand description

§RAoC - Rust Advent of Code helper library

An oxidation of aoc_helper.

§Usage

RAoC is both a library and a binary. The binary can be used to control the configuration for the library (instead of modifying the configuration directory directly).

RAoC shares its configuration directory with aoc_helper; so if you have one working, the other should too.

§Automation

This project aims to be compliant with the Advent of Code Automation Guidelines. Here are the strategies it uses:

§Configuration

(lifted straight from the documentation of aoc_helper)

When you first use any function that interfaces with Advent of Code, you will be prompted to enter your session token.

Your session token is stored as a HTTPOnly cookie. This means there is no way of extracting it with JavaScript, you either must use a browser extension such as EditThisCookie, or follow this guide

This token is stored in ~/.config/aoc_helper/token.txt (C:\Users\YOUR_USERNAME\.config\aoc_helper\token.txt on Windows), and other aoc_helper data is stored in this folder (such as your input and submission caches).

If, for whatever reason, you feel the need to clear your caches, you can do so by deleting the relevant folders in aoc_helper’s configuration folder.

Traits§

MaybeDisplay

Functions§

async_fetch
Fetch and return the input for day of year.
async_get_sample_input
Retrieve the example input and answer for the specified puzzle.
async_lazy_submit
Run the functions only if we haven’t seen a solution.
async_lazy_submit_part
Run the function only if we haven’t seen a solution.
async_submit
Submit a solution.
async_wait
Wait the specified time, displaying a countdown, a spinner, and a message.
async_work
Run the given worker function, displaying a message, spinner, and elapsed timer.
fetch
Fetch and return the input for day of year.
fetch
Fetch and return the input for day of year.
get_sample_input
Retrieve the example input and answer for the specified puzzle.
get_sample_input
Retrieve the example input and answer for the specified puzzle.
lazy_submit
Run the functions only if we haven’t seen a solution.
lazy_submit
Run the functions only if we haven’t seen a solution.
lazy_submit_part
Run the function only if we haven’t seen a solution.
lazy_submit_part
Run the function only if we haven’t seen a solution.
submit
Submit a solution.
submit
Submit a solution.
sync_fetch
Fetch and return the input for day of year.
sync_get_sample_input
Retrieve the example input and answer for the specified puzzle.
sync_lazy_submit
Run the functions only if we haven’t seen a solution.
sync_lazy_submit_part
Run the function only if we haven’t seen a solution.
sync_submit
Submit a solution.
sync_wait
Wait the specified time, displaying a countdown, a spinner, and a message.
sync_work
Run the given worker function, displaying a message, spinner, and elapsed timer.
wait
Wait the specified time, displaying a countdown, a spinner, and a message.
wait
Wait the specified time, displaying a countdown, a spinner, and a message.
work
Run the given worker function, displaying a message, spinner, and elapsed timer.
work
Run the given worker function, displaying a message, spinner, and elapsed timer.