Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: add flag for reading specified puzzle part #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tyrone-wu
Copy link

@tyrone-wu tyrone-wu commented Dec 1, 2024

Add an optional --part flag that accepts values 1 or 2 in the read subcommand for displaying/reading the specified part of the puzzle. If the flag is not specified, this defaults to displaying the entire puzzle.

This also adds some display consistencies. When output includes part 1 puzzle, the --- Part One --- subheader is included in the output. Additionally, if only displaying part 2 puzzle, the --- Day Foo: Bar --- header is included in the output.

Fixes: #27

Add a `--part` flag in the `read` subcommand to display/read the
specified part of the puzzle.

When part 1 is included in display (either by directly specifying
`--part 1`, or by not specifying `--part` flag which defaults to both
part 1 & 2), the `--- Part One ---` subheader is added in the output.
This makes display consistent with the output for part 2
(`--- Part Two ---`, which is included by default), and adds better
indicator for the puzzle sections.

Fixes: scarvalhojr#27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a flag for PuzzlePart in read subcommand
1 participant