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

submit command - update output text from parsing adventofcode.com responses #223

Closed
beakerandjake opened this issue Sep 9, 2023 · 0 comments · Fixed by #236
Closed

submit command - update output text from parsing adventofcode.com responses #223

beakerandjake opened this issue Sep 9, 2023 · 0 comments · Fixed by #236
Labels
bug Something isn't working

Comments

@beakerandjake
Copy link
Owner

beakerandjake commented Sep 9, 2023

Describe the bug
The cli attempts to output minimal information from adventofcode responses when submitting answers. Need to update the parsing because there are certain scenarios where the output is not formatting as expected.

Here is an example malformed output

☃️  Puzzle (Year: 2022 Day: 24 Level: 2)  ❄️ 
🎁 Loading cached input file 🔔
🎅 Executing your code 🛷
🌨️  You answered: 816 (solved in 995.831ms) 🌨️ 
🤶 Submitting your answer to advent of code 🍪
🎄 That's the right answer! You are one gold star closer to collecting enough star fruit.You have completed Day 24! You can [Shareon Twitter Mastodon] this victory or 🛷
☃️  Saved progress to your README file 🎁

The second to last line reads:

🎄 That's the right answer! You are one gold star closer to collecting enough star fruit.You have completed Day 24! You can [Shareon Twitter Mastodon] this victory or 🛷

It should read something more along the lines of:

🎄 That's the right answer! You are one gold star closer to collecting enough star fruit. You have completed Day 24!  🛷

This one is tricky too because there are different scenarios which result in different responses the website. Each of these must be parsed and its text cleaned and output to the console.

  • Submitted level 1 correctly
  • Submitted level 2 correctly
  • Failed level N with a too low message
  • Failed level N with a too high message
  • Submitted answer too quickly
  • Simple wrong answer message after multiple attempts without a low or high message.
  • Any other potential responses I have not encountered.
  • Solving at wrong level (attempting to solve level 2 without solving level 1)

To Reproduce
Steps to reproduce the behavior:

  1. Correctly submit a puzzle for the first time.

Expected behavior
The output should either be standardized to return a set of messages without attempting to extract the actual text from the html, or the text extraction should get better.

@beakerandjake beakerandjake added the bug Something isn't working label Sep 9, 2023
@beakerandjake beakerandjake changed the title Update response parsing from adventofcode.com submit command - update output text from parsing adventofcode.com responses Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant