Skip to content

BaDxKaRMa/adventofcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stats

2024 Results

Day Part 1 Part 2
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Day 9

🎄 advent-cli

This repo uses the Advent-CLI python tool (found in pypi). advent-cli is a command-line tool for interacting with Advent of Code, specifically geared toward writing solutions in Python. It can be used to view puzzle prompts, download input, submit solutions, and view personal or private stats and leaderboards.

Installation

Install from PyPI:

pip install advent-cli

Or grab the latest version from GitHub:

pip install git+https://github.com/fergusch/advent-cli.git@develop

Setup

Before you do anything, you'll need to provide advent-cli with a session cookie so it can authenticate as you. To do this, log in to the Advent of Code website and grab the cookie named session from your browser's inspect element tool. Store it in an environment variable on your machine named ADVENT_SESSION_COOKIE. A fresh session cookie is good for about a month, after which you'll need to repeat these steps.

A full list of configuration options can be found here.

Usage

advent-cli can be invoked using the advent command, or python -m advent_cli.

Configuration

The following environment variables can be set to change the default config:

Variable Function
ADVENT_SESSION_COOKIE Advent of Code session cookie for authentication. (required)
ADVENT_PRIV_BOARDS Comma-separated list of private leaderboard IDs.
ADVENT_DISABLE_TERMCOLOR Set to 1 to permanently disable coloring terminal output.
ADVENT_MARKDOWN_EM Method for converting <em> tags inside code blocks. See below for context and options.

About

New Home for Advent of Code challenges

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages