# https://taskfile.dev version: "3" dotenv: - .env tasks: default: desc: Prints this message cmds: - cmd: task --list-all day:input: desc: Creates the files needed to solve a day of Advent of Code requires: vars: - YEAR - DAY vars: FORMATTED_DAY: '{{if (lt (atoi .DAY) 10)}}0{{.DAY}}{{else}}{{.DAY}}{{end}}' URI: https://adventofcode.com/{{.YEAR}}/day/{{.DAY}}/input INPUT_DIR: '/.input/{{.YEAR}}' cmds: - cmd: mkdir --parents {{.INPUT_DIR}} - cmd: curl --cookie 'session={{.SESSION}}' {{.URI}} > {{.INPUT_DIR}}/{{.FORMATTED_DAY}}.txt silent: true git:hooks: desc: sets up the githooks for the project cmd: git config core.hooksPath .githooks