No description
Find a file
2022-12-11 12:47:44 +01:00
src added ParseIntError to error chain 2022-12-11 12:47:44 +01:00
.gitignore excluded testing stuff 2022-12-04 01:49:09 +01:00
Cargo.lock initial commit 2022-11-30 01:07:55 +01:00
Cargo.toml made the main functionality a lib for ease of use in each day's solution 2022-11-30 21:36:00 +01:00
README.md added readme 2022-12-04 02:13:25 +01:00

get_inputs

This is a crate to automatically run your Advent of Code with your personal inputs. To install it, add the following line to your Cargo.toml file:

get_inputs = {git = "https://github.com/jemand2001/advent_of_code_inputs"}

In your code, you should then be able to do the following:

use get_inputs::{run_on_input, Result};

// define parser and runner somehow

fn main() -> Result<()> {
    run_on_input(1, runner, parser);  // this will get your input, try to parse it using the parser, and call the runner on the result
}

Lastly, you need a file called .env in your working directory that contains your session cookie for Advent of Code. It should look something like this:

session=1234567890abcdef...

Now you can run your Advent of Code solution with cargo run.