+
+
+
+-- | Construct a Cfg object from the command line options assuming
+-- there are no errors.
+get_cfg :: IO Cfg
+get_cfg = do
+ opts <- parse_options
+ return Cfg { consumer_key = fromJust $ opt_consumer_key opts,
+ consumer_secret = fromJust $ opt_consumer_secret opts,
+ access_token = fromJust $ opt_access_token opts,
+ access_secret = fromJust $ opt_access_secret opts,
+ heartbeat = fromJust $ opt_heartbeat opts,
+ ignore_replies = opt_ignore_replies opts,
+ ignore_retweets = opt_ignore_retweets opts,
+ sendmail_path = opt_sendmail_path opts,
+ from_address = opt_from opts,
+ to_address = opt_to opts,
+ verbose = opt_verbose opts }