mewen25 / Advent-Of-Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advent of Code 2023

Advent of code Project built in Deno with utils to get the next day's challenge setup and ready as quickly as possible.
Includes a program to automatically fetch a day's input, test input, and question page screenshot

Setup

install deno

To start fresh

  • rm -rf days && rm -rf input (Remove existing data)
  • deno run -A setup.ts (Recreate folder structure)
    • deno run -A setup.ts 1 (Or run each day individually)

Cookie

Add unique session cookie from logging into adventofcode.com to .env, -- see .env.example

Usage

Run the setup.ts file with the day number as an argument
It will then attempt to fetch all the day information and place info into input/dayNumber and days/dayNumber

Example

deno run -A setup.ts 1

Executing a day

deno run -A days/day01/index.ts

This will log the return from both functions - part1.ts and part2.ts

You can choose to run against the test data instead by changing: days/day01/index.ts > utils.dayInputString('01') to utils.dayInputString('01', true)

About


Languages

Language:TypeScript 99.9%Language:Shell 0.1%Language:Batchfile 0.0%