From 86e1cd0692940c796e281450dca52f8cde1641de Mon Sep 17 00:00:00 2001 From: taitep Date: Sat, 20 Dec 2025 11:43:28 +0100 Subject: init --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.md (limited to 'README.md') 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//d.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 ` + +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 + 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). -- cgit v1.2.3