AdventOfCode.NET
1.0.1
dotnet add package AdventOfCode.NET --version 1.0.1
NuGet\Install-Package AdventOfCode.NET -Version 1.0.1
<PackageReference Include="AdventOfCode.NET" Version="1.0.1" />
paket add AdventOfCode.NET --version 1.0.1
#r "nuget: AdventOfCode.NET, 1.0.1"
// Install AdventOfCode.NET as a Cake Addin #addin nuget:?package=AdventOfCode.NET&version=1.0.1 // Install AdventOfCode.NET as a Cake Tool #tool nuget:?package=AdventOfCode.NET&version=1.0.1
AdventOfCode.NET
All things in this document are subject to change during development.
How to setup
Simply create a new .NET Core console application, import the AdventOfCode.NET
NuGet package and add the following to your entry point:
using AdventOfCode.NET;
Startup.InitializeFramework(args);
Then, you'll have to call the init
command to initialize the application with your Advent of Code session token.
You can do so by executing dotnet run init <session>
. For example, dotnet run init 53616c...f37200
.
Commands
From your terminal, call dotnet run
to get a list of commands available. This should print something like this:
USAGE:
[YourProject].dll [OPTIONS] <COMMAND>
OPTIONS:
-h, --help Prints help information
-v, --version Prints version information
COMMANDS:
init <session> Initialize environment variables
setup <date> Setup a new problem
solve <date> Solve a problem's test cases
Two notations are used: <argument>
and [argument]
.
<argument>
means the argument is required[argument]
means the argument is optional
[-a | --argument]
might also appear, this means that the command can be called by either its short or long format.
Initialize [init]
Initialize any values required by the application.
<session>
- AoC session token.
[-b | --branch]
- Defines your default branch's name. Default value is
master
. If you use another name, set it with this argument.
- Defines your default branch's name. Default value is
[--no-git]
- Flag to choose whether you want git operations to run. If true, no dedicated branch will be created for each day and no time spent on problem will be calculated once part two of the problem is solved.
[--silent]
- Flag to choose whether you want to see a lot of verbosity in the output of any command. If true, only key information will be printed. (Mostly for debug purposes).
Setup [setup]
Setup an Advent Of Code problem to solve it locally.
This will create a folder for that day that includes a README.md
with the problem, a Solution.cs
with entry points to solve each part of the day and an example of how you can test your code against custom tests.
<date>
- Date must be in
YYYY/DD
format. For example,2015/03
.
- Date must be in
[--no-git]
- Flag to choose whether you want git operations to run. If true, no dedicated branch will be created for each day and no time spent on problem will be calculated once part two of the problem is solved.
Solve [solve]
Attempt to solve a problem's solution. Before submitting an answer to Advent of Code servers, local tests will be ran (if any is defined).
<date>
- Date must be in
YYYY/DD
format. For example,2015/03
.
- Date must be in
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- HtmlAgilityPack (>= 1.11.57)
- LibGit2Sharp (>= 0.29.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Spectre.Console.Cli (>= 0.48.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1 | 164 | 2/9/2024 |