mrcaseb / aoc.elf

Tan's Helper Functions for Advent of Code

Home Page:https://tanho63.github.io/aoc.elf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aoc.elf

Lifecycle: experimental Dev status

The goal of aoc.elf is to provide helper functions for Advent of Code solutions in R.

Installation

You can install aoc.elf with:

remotes::install_github("tanho63/aoc.elf")

Usage

Configuration options are set with environment variables AOC_COOKIE and AOC_AUTHOR. You can also use the following helper functions:

aoc_set_cookie(cookie = "{COOKIE}")
aoc_set_author(author = "{AUTHOR}")

You can find the cookie value here in your network tab.

Alternatively, you can set AOC_COOKIE and AOC_AUTHOR environment variables in your project’s .Renviron file (this should be a bit more persistent).

It’s important to have an .Rproj file at the top level of your AOC folder, the functions rely on that structure to build the subfolder for each year.

aoc_init(2) 

will create a new RMD template for day 2 of the current year. Can also specify year, path, overwrite, and open.

aoc_get(2)

will download and cache inputs for the specified day/year. The template has a chunk with this pre-filled, so you can just run that chunk inside the notebook! (You can also specify year, path, overwite here.)

Code of Conduct

Please note that the aoc.elf project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

About

Tan's Helper Functions for Advent of Code

https://tanho63.github.io/aoc.elf

License:Other


Languages

Language:R 92.9%Language:CSS 7.1%