| Crates.io | aocf_cli |
| lib.rs | aocf_cli |
| version | 0.1.21 |
| created_at | 2020-01-12 06:17:14.585375+00 |
| updated_at | 2022-12-19 16:57:48.443606+00 |
| description | CLI helper tool for Advent of Code, with a workflow similar to Git |
| homepage | |
| repository | https://github.com/nuxeh/aocf |
| max_upload_size | |
| id | 197682 |
| size | 64,693 |
aocf_cli - Advent of Code fetch CLIA CLI helper tool for Advent of Code.
This is a wrapper around the aocf crate, and freely interoperates with it if
needed.
cargo install aocf_cli
Or from source:
git clone https://github.com/aocf
cd aocf/aocf_cli
cargo install --path .
The tool will now be available as aocf for the user who ran this command. The
cargo binary install path provided after cargo completes may need to be added
to your shell's PATH variable.
initInitialise an aocf repository, similar to how you would initialise a git
repository. Data and configuration for aocf is kept in ./.aocf.
set-cookieWrite the cookie into cache using provided session cookie string.
get-cookieExtract your session cookie from the Firefox cookie store. You should have
previously logged in to Advent of code using Firefox. This command will then
set the cookie as with set-cookie.
checkoutMove to a given day, and optionally year. May be combined with --now.
fetchFetch input and brief for the current day.
briefShow the brief for the currently checked out day.
inputPrint the currently checked out day's input.
statusShow the current status (for the currently checked out day).
summaryShow a summary of all challenges which exist in the cache, and stars achieved,
for a given challenge year. The year shown is either the currently checked out
year, or the year provided by the --year command line option.
completionGenerate a shell completion script. Supported shells are Bash, Zsh, Fish, Powershell, Elvish.
helpGet help on command usage, for a given subcommand.
--now--year--dayThese can be used to override the current day or year used when fetching, or other commands. Generally commands will get the day and year from the root configuration if it exists, and these are not provided.
--viewIf no flags are given, aocf will generally output content on standard output
or stderr; if --view is provided, output will be piped to the pager programme
specified in the root configuration (.aocf/config) as e.g. pager = "less".
--prettyOnly available for the brief subcommand, pretty formats the challenge brief
in a similar format to viewing on the Advent of Code website, in a scrollable,
pager fashion.
--webOnly available for the brief subcommand, opens the brief in a web browser.
--forceThis will force retrieval from the AoC site, even if a cache exists already for the current day/problem part.
The cache for data for each day is stored as JSON under .aocf/cache.