Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow solve to automatically submit inputs #19

Closed
fspoettel opened this issue Dec 4, 2022 · 4 comments · Fixed by #25
Closed

Allow solve to automatically submit inputs #19

fspoettel opened this issue Dec 4, 2022 · 4 comments · Fixed by #25
Assignees
Labels
enhancement New feature or request

Comments

@fspoettel
Copy link
Owner

aoc-cli supports submitting inputs with a command. It would valuable to support automatic submissions for solve behind a flag, e.g. cargo solve 04 --submit.

@fspoettel fspoettel added enhancement New feature or request help wanted Extra attention is needed labels Dec 4, 2022
@fspoettel
Copy link
Owner Author

#21 added a wrapper module for aoc_cli, this should be a bit easier now.

@fspoettel fspoettel removed the help wanted Extra attention is needed label Dec 6, 2022
@fspoettel fspoettel self-assigned this Dec 6, 2022
@fspoettel
Copy link
Owner Author

I implemented this on my 2022 repo here. I'll test it tomorrow and if all goes well, write the docs and merge into this template.

The syntax for submissions will be cargo solve <day> --submit <part>. --submit will be ignored until the part function produces a Some() istd. of a None.

The implemented solution has two nice side effects:

  1. It uses .cargo/config.toml's [env] to set the year, thereby eliminating the --year flags.
  2. solve is now a command istd. of an alias and accepts 6 in addition to 06 for day input.

@kwiat1990
Copy link

Hey, I wonder what’s the current state of this pull request?

@fspoettel
Copy link
Owner Author

@kwiat1990 I am a bit preoccupied with work until march/april. Planning to merge this alongside other improvements (better benchmarks, improved scaffolding) as soon as I have some spare time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants