#advent #input #cache #aoc #download #fetch #entry-point

emergence

A small library to download and cache Advent of Code inputs

11 releases (stable)

2.0.1 Dec 1, 2024
2.0.0 Nov 29, 2023
1.1.0 Dec 12, 2022
1.0.2 Nov 30, 2022
0.1.0 Dec 1, 2021

#7 in #entry-point

Download history 11/week @ 2024-09-22 1/week @ 2024-09-29 4/week @ 2024-11-03 4/week @ 2024-11-24 110/week @ 2024-12-01

114 downloads per month

MPL-2.0 license

20KB
213 lines

Emergence

Emergence is a library to fetch and cache Advent of Code inputs.

The AoC struct is the main entry point for this library.

See AoC::new and AoC::read_or_fetch for usage

Example

fn main() -> Result<(), Box<dyn Error>> {
    let aoc = AoC::new(2020)?; // year 2020
    let input = aoc.read_or_fetch(1)?; // day 01
    solve(&input); // Implementation of `solve` left as an exercise to the reader :)
    Ok(())
}

Available under the terms of version 2.0 of the Mozilla Public Licence


lib.rs:

Emergence is a library to fetch and cache Advent of Code inputs.

The [AoC] struct is the main entry point for this library.

See AoC::new and AoC::read_or_fetch for usage

Example

fn main() -> Result<(), Box<dyn Error>> {
    let aoc = AoC::new(2020)?; // year 2020
    let input = aoc.read_or_fetch(1)?; // day 01
    solve(&input); // Implementation of `solve` left as an exercise to the reader :)
    Ok(())
}

Dependencies

~5–20MB
~233K SLoC