main :: IO()
main = do
  (opts, _) <- getOptsArgs (makeOptions options) [] []
  let maybeRepositories = lookup "repositories" opts
      maybeLogin = lookup "login" opts
      maybeConf = lookup "file" opts
      format = lookup "output-format" opts
  case maybeRepositories of
    Nothing -> do
      repos <- getRepos maybeConf
      process repos maybeLogin $ outputFormat $ fromMaybe "html" format
    Just r -> do
      repos <- return $ splitRegex (mkRegex ",") r
      process repos maybeLogin $ outputFormat $ fromMaybe "html" format
main :: IO()
main = do
  (opts, _) <- getOptsArgs (makeOptions options) [] []
  let maybeRepositories = lookup "repositories" opts
      maybeLogin = lookup "login" opts
      maybeConf = lookup "file" opts
      format = lookup "output-format" opts
  case maybeRepositories of
    Nothing -> do
      repos <- getRepos maybeConf
      process repos maybeLogin $ outputFormat $ fromMaybe "html" format
    Just r -> do
      repos <- return $ splitRegex (mkRegex ",") r
      process repos maybeLogin $ outputFormat $ fromMaybe "html" format
main = do
  (opts, _) <- getOptsArgs (makeOptions options) [] []
  let maybeRepositories = lookup "repositories" opts
      maybeLogin = lookup "login" opts
      maybeConf = lookup "file" opts
      format = lookup "output-format" opts
  case maybeRepositories of
    Nothing -> do
      repos <- getRepos maybeConf
      process repos maybeLogin $ outputFormat $ fromMaybe "html" format
    Just r -> do
      repos <- return $ splitRegex (mkRegex ",") r
      process repos maybeLogin $ outputFormat $ fromMaybe "html" format