stefanotorresi / thorr-advent
Advent of Code puzzle solutions wrapped in a PHP7 CLI app
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Type:puzzles
Requires
- php: ^7.0
- beberlei/assert: ^2.4
- devster/ubench: ^1.2
- symfony/console: ^3.0
Requires (Dev)
- phpunit/phpunit: ^5.1
This package is auto-updated.
Last update: 2024-11-12 03:23:49 UTC
README
Advent of Code puzzle solutions wrapped in a PHP7 CLI app. Most overkill and far from code golf as it can be.
Installation
Composer global install
$: composer global require stefanotorresi/thorr-advent
The executable will be ~/.composer/bin/advent
.
Git
$: git clone https://github.com/stefanotorresi/thorr-advent
$: cd thorr-advent
$: composer install
The executable will be ./advent
.
Phar
TBD
Usage
Each puzzle is available as a command named dayN
.
You can use either a file path or stdin as input:
$: advent day1 day1.txt
$: echo "()()())))((((((((((((" | advent day1
Both parts of the puzzle will be executed by default, but you can execute just a single part if you want,
using the --part
option:
$: advent day1 day1.txt --part basement
You can get to know the part names with the help
command:
$: advent help day1