summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ O'Leary <dijitol@proton.me>2025-03-03 01:46:24 +0100
committerDJ O'Leary <dijitol@proton.me>2025-03-03 01:46:24 +0100
commit4e81b19c2e6f081e45917dc2aac4381d863def83 (patch)
tree8076c9fb1aab6a45ecfa37cc22805386005ceaff
parent6014cbb25bfa52b7276c5e8be94aa8d26e1dc30f (diff)
feat: Update README and Taskfile
-rw-r--r--README.md3
-rw-r--r--Taskfile.yml20
2 files changed, 7 insertions, 16 deletions
diff --git a/README.md b/README.md
index e69de29..73191fc 100644
--- a/README.md
+++ b/README.md
@@ -0,0 +1,3 @@
+# Advent of Code
+
+Solutions to the puzzles found at https://adventofcode.com/
diff --git a/Taskfile.yml b/Taskfile.yml
index b9e8cfe..dfbcb39 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -8,29 +8,17 @@ tasks:
desc: Prints this message
cmds:
- cmd: task --list-all
- day:setup:
+ day:input:
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}}'
+ INPUT_DIR: '{{.YEAR}}/_input'
cmds:
- - cmd: curl --cookie 'session={{.SESSION}}' {{.URI}} > {{.YEAR}}/_input/day_{{.FORMATTED_DAY}}.txt
+ - cmd: mkdir --parents {{.INPUT_DIR}}
+ - cmd: curl --cookie 'session={{.SESSION}}' {{.URI}} > {{.INPUT_DIR}}/day_{{.FORMATTED_DAY}}.txt
silent: true