             <> P.progDesc "Generate a single-elimination tournament bracket from new-line separated contestant names provided in stdin."
             <> P.header "pingpongmageddon")

    optParser :: P.Parser CmdArgs
    optParser = CmdArgs
      <$> P.flag GraphViz JSON (P.long "json"
                                <> P.short 'j'
                                <> P.help "Output JSON format tournament instead of GraphViz")
      <*> P.option P.auto (P.long "seed"
                           <> P.short 's'
                           <> P.value defaultSeed
                           <> P.metavar "INTEGER"
                           <> P.help "Specify a fixed random seed")