git clonethis repo somewhereruby sb-squares/squares.rb
Small CLI and library to generate Super Bowl squares grids and write them to CSV.
Install dependencies:
bundle installRun tests:
bundle exec rspec --format documentationInteractive:
./bin/squaresNon-interactive (CSV input):
ruby bin/squares --csv=path/to/players.csv --afc="TeamA" --nfc="TeamB"By default, output is written to the output/ directory. If --output is provided, that path will be used exactly:
ruby bin/squares --csv=spec/fixtures/players.csv --afc=TeamA --nfc=TeamB --output=spec/out.csvIf --output is not provided, the CLI will generate a filename of the form:
output/{AFCTEAM}v{NFCTEAM}-{YEAR}[-{name}].csv
The optional --name flag will append a string to the generated filename (useful to avoid collisions).
ruby bin/squares --csv=spec/fixtures/players.csv --afc="Chiefs" --nfc="Eagles" --name=party
# writes output/ChiefsvEagles-2025-party.csv- The
output/directory is gitignored to avoid committing generated files. - If you choose Manual entry (no
--csv), the CLI preserves the interactive flows including the "Re-enter" or "Start over" options when a manual entry would exceed 100 squares.