Skip to content

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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