Giter VIP home page Giter VIP logo

aoc-runner's Introduction

aoc-runner

Command line runner for Clojure Advent of Code projects

Features

  • Downloads input files from the AoC website
  • Automatically detects solution files and runs them
  • Provides nice CLI output with run times of solutions

CLI Screenshot

Usage

aoc-runner finds packages named aoc.day<n>, and looks for functions named part1 and part2. Each function is called with the puzzle input as an argument, and should return the solution for the given day & part.

You may optionally define a function named parse, which will be run before the solution functions. When parse is provided, it is passed the input string and its return value is passed to part1 and part2 instead of the raw input. If you need a different parser for parts 1 and 2, you can alternatively provide parse-part1 and parse-part2 functions.

Downloading puzzle input

aoc-runner searches for puzzle input under resources/input/day<n>.txt. If input for a day can't be found, it will attempt to download it from the AoC website. Since puzzle input is unique to each user, you need to provide a session token for aoc-runner to use when downloading. You can find this in your session cookie on the AoC website. Paste the value into a file named .aoc-session in your working directory.

API

  • (run-latest [year]): Run the latest day that a package exists for
  • (run-all [year]): Run all puzzles for a given year
  • (run-day [year day]): Run a specific day's solver

aoc-runner's People

Contributors

delta62 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.