X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FCommandLine.hs;h=6d894b91f55048c746f2c02d07a1f1251f97836c;hb=7c3e8169dfce7de580f2f224d0845de01b379249;hp=071c5209307116787404555eecfa941b22b1488a;hpb=a2c2a1a6865be7b4cd17fb72de635bb9385728b9;p=dead%2Fhtsn.git diff --git a/src/CommandLine.hs b/src/CommandLine.hs index 071c520..6d894b9 100644 --- a/src/CommandLine.hs +++ b/src/CommandLine.hs @@ -13,6 +13,7 @@ import System.Console.CmdArgs ( program, summary, typ, + typFile, typDir ) -- This let's us get the version from Cabal. @@ -24,7 +25,7 @@ import OptionalConfiguration (OptionalConfiguration(..)) -- | The description of the program, displayed as part of the help. description :: String -description = "Parse XML files from The Sports Network." +description = "Parse XML files from The Sports Network feed." -- | The name of this program. program_name :: String @@ -35,6 +36,15 @@ my_summary :: String my_summary = program_name ++ "-" ++ (showVersion version) +-- | A description of the "log_file" option. +log_file_help :: String +log_file_help = + "If syslog == False, log to the given file." + +log_level_help :: String +log_level_help = + "How verbose should the logs be? One of INFO, WARNING, ERROR." + -- | A description of the "password" option. password_help :: String password_help = @@ -45,6 +55,11 @@ output_directory_help :: String output_directory_help = "Directory in which to output the XML files; must be writable" +-- | A description of the "syslog" option. +syslog_help :: String +syslog_help = + "Enable (default) or disable logging to syslog." + -- | A description of the "username" option. username_help :: String username_help = @@ -56,8 +71,11 @@ username_help = arg_spec :: OptionalConfiguration arg_spec = OptionalConfiguration { + log_file = def &= typFile &= help log_file_help, + log_level = def &= typ "LEVEL" &= help log_level_help, password = def &= typ "PASSWORD" &= help password_help, output_directory = def &= typDir &= help output_directory_help, + syslog = def &= typ "BOOL" &= help syslog_help, username = def &= typ "USERNAME" &= help username_help, feed_hosts = def &= typ "HOSTNAMES" } &= program program_name