diff options
| author | DJ O'Leary <dijitol@proton.me> | 2025-03-03 01:28:23 +0100 |
|---|---|---|
| committer | DJ O'Leary <dijitol@proton.me> | 2025-03-03 01:28:23 +0100 |
| commit | 6014cbb25bfa52b7276c5e8be94aa8d26e1dc30f (patch) | |
| tree | b549e57a87af8c3140da28a2f7bcd1297502fdc1 /Taskfile.yml | |
| parent | 6860b6e83f2c6be5e59253105cf397c5b27b1590 (diff) | |
feat: reorg repo
Diffstat (limited to 'Taskfile.yml')
| -rw-r--r-- | Taskfile.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..b9e8cfe --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,36 @@ +# https://taskfile.dev + +version: "3" +dotenv: + - .env +tasks: + default: + desc: Prints this message + cmds: + - cmd: task --list-all + day:setup: + desc: Creates the files needed to solve a day of Advent of Code + requires: + vars: + - YEAR + - DAY + - LANG + vars: + FORMATTED_DAY: '{{if (lt (atoi .DAY) 10)}}0{{.DAY}}{{else}}{{.DAY}}{{end}}' + cmds: + - cmd: mkdir --parents {{.YEAR}}/{{.LANG}}/day_{{.FORMATTED_DAY}} + - task: fetch-input + silent: true + fetch-input: + desc: Fetches your input from adventofcode.com for the specified day + internal: true + requires: + vars: + - YEAR + - DAY + vars: + URI: https://adventofcode.com/{{ .YEAR }}/day/{{.DAY}}/input + FORMATTED_DAY: '{{if (lt (atoi .DAY) 10)}}0{{.DAY}}{{else}}{{.DAY}}{{end}}' + cmds: + - cmd: curl --cookie 'session={{.SESSION}}' {{.URI}} > {{.YEAR}}/_input/day_{{.FORMATTED_DAY}}.txt + silent: true |
