Skip to content

srolandmarshall/sb-squares

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Super Squares

A Quick Ruby Script to Make Squares

Only Requires Ruby!

How to Run

  1. git clone this repo somewhere
  2. ruby sb-squares/squares.rb

sb-squares

Small CLI and library to generate Super Bowl squares grids and write them to CSV.

Usage

Install dependencies:

bundle install

Run tests:

bundle exec rspec --format documentation

CLI

Interactive:

./bin/squares

Non-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.csv

Filename generation

If --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).

Examples

ruby bin/squares --csv=spec/fixtures/players.csv --afc="Chiefs" --nfc="Eagles" --name=party
# writes output/ChiefsvEagles-2025-party.csv

Notes

  • 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.

About

A program for creating squares for football games

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages