X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;ds=sidebyside;f=src%2FCommandLine.hs;h=6fb30fedc151d735346338be62551232ca3e8d42;hb=39e047ccd8422207e01247c63f514c40e7eac31e;hp=578179e9add1c60af9d7421d62bbefd821ccdf78;hpb=08bee78f64c72b943ef775d9914e457c05eae7e8;p=mailbox-count.git diff --git a/src/CommandLine.hs b/src/CommandLine.hs index 578179e..6fb30fe 100644 --- a/src/CommandLine.hs +++ b/src/CommandLine.hs @@ -30,39 +30,50 @@ my_summary = program_name ++ "-" ++ (showVersion version) database_help :: String database_help = - "The name of the database to which we should connect" + "The name of the database (or file, if SQLite) to which we should connect" detail_help :: String detail_help = "Produce a detailed report listing all mailboxes by domain" +detail_query_help :: String +detail_query_help = + "SQL query used to produce the detail report" + host_help :: String host_help = - "Hostname where the database is located" + "Hostname where the database is located (postgres-only)" password_help :: String password_help = - "Password used to connect to the database" + "Password used to connect to the database (postgres-only)" port_help :: String port_help = - "Port number used to connect to the database" + "Port number used to connect to the database (postgres-only)" + +summary_query_help :: String +summary_query_help = + "SQL query used to produce the summary report" username_help :: String username_help = - "Username used to connect to the database" + "Username used to connect to the database (postgres-only)" arg_spec :: OptionalConfiguration -arg_spec = OptionalConfiguration - { database = def &= help database_help, - detail = def &= help detail_help, - host = def &= help host_help, - password = def &= help password_help, - port = def &= help port_help, - username = def &= help username_help } - &= program program_name - &= summary my_summary - &= details [description] +arg_spec = + OptionalConfiguration { + database = def &= help database_help, + detail = def &= help detail_help, + detail_query = def &= help detail_query_help, + host = def &= help host_help, + password = def &= help password_help, + port = def &= help port_help, + summary_query = def &= help summary_query_help, + username = def &= help username_help } + &= program program_name + &= summary my_summary + &= details [description] get_args :: IO OptionalConfiguration get_args = cmdArgs arg_spec