summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authortaitep <taitep@taitep.se>2025-12-20 11:43:28 +0100
committertaitep <taitep@taitep.se>2025-12-20 11:43:28 +0100
commit86e1cd0692940c796e281450dca52f8cde1641de (patch)
tree359dc3f5befee4ab62be760c095b616531ddbe2d /README.md
init
Diffstat (limited to 'README.md')
-rw-r--r--README.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f5f90cf
--- /dev/null
+++ b/README.md
@@ -0,0 +1,40 @@
+# aoctools
+Set of bash scripts for interacting with Advent of Code from the CLI.
+
+Aims to be minimal but functional, current set of utilities is only ~100 lines of bash and can do most of what you would need.
+
+I may add an answer uploader in the future, but I dont currently see a huge need for it.
+
+## directories
+Everything aoctools uses lives in the directory specified by `$AOC_DIR`, defaulting to `~/.aoc`.
+
+There are 2 things within here you should care about
+- `$AOC_DIR/cache`: A cache of downloaded inputs. The input for a day can be found at `cache/<year>/d<day>.in`
+- `$AOC_DIR/session`: Your session cookie, required to download your personal inputs. Should be able to be found in the devtools of your browser.
+ Do not include something like `session=` at the start, just the session key itself, should be a string of random letters and numbers.
+
+## dependencies
+Just `bash`, standard GNU/POSIX utilities (only tested on linux with GNU utils, probably works on macOS and busybox too), and `curl`.
+
+## `aoc-inputdl`
+This is the main utility you will be using to download inputs.
+
+`Usage: aoc-inputdl <year> <day>`
+
+Downloaded inputs will be automatically cached.
+
+The input data will end up in stdout, letting you view it, redirect to a file, or pipe to your solution.
+
+## `aoc-cacheclear`
+Clears your cache.
+
+```
+Usage: aoc-cacheclear <year> <day?>
+ aoc-cacheclear all
+```
+
+If passed `all`, the whole cache will be cleared.
+If only a year is passed, the full cache for that year will be cleared.
+If year and day, the cache for that day will be cleared.
+
+It is also easy to just clear it manually using `rm`, as the structure is very predictable. See [directories](#directories).