X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FCommandLine.hs;h=6fb30fedc151d735346338be62551232ca3e8d42;hb=39e047ccd8422207e01247c63f514c40e7eac31e;hp=6c8833c9f53390f15ec58d61a05d2fd5fb76a56e;hpb=bc4c3efd191f3cc5b7b9f046775bff706c491a7d;p=mailbox-count.git diff --git a/src/CommandLine.hs b/src/CommandLine.hs index 6c8833c..6fb30fe 100644 --- a/src/CommandLine.hs +++ b/src/CommandLine.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE DeriveDataTypeable #-} - module CommandLine ( get_args ) where @@ -32,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