( heartbeat,
help_set,
help_text,
+ ignore_replies_set,
+ ignore_retweets_set,
from_email_address,
to_email_address,
parse_errors,
-- |A record containing values for all available options.
data Options = Options { opt_heartbeat :: Maybe Int,
opt_help :: Bool,
- opt_ignore_retweets :: Bool,
opt_ignore_replies :: Bool,
+ opt_ignore_retweets :: Bool,
opt_from :: Maybe String,
opt_to :: Maybe String }
default_options :: Options
default_options = Options { opt_heartbeat = Just 600,
opt_help = False,
- opt_ignore_retweets = False,
opt_ignore_replies = False,
+ opt_ignore_retweets = False,
opt_from = Nothing,
opt_to = Nothing }
"Send tweets FROM email_address.",
Option
- ['i']["ignore-retweets"]
- (NoArg set_ignore_retweets)
- "Ignore retweets.",
+ ['i']["ignore-replies"]
+ (NoArg set_ignore_replies)
+ "Ignore replies.",
Option
- ['I']["ignore-replies"]
- (NoArg set_ignore_replies)
+ ['I']["ignore-retweets"]
+ (NoArg set_ignore_retweets)
"Ignore retweets."
]
opts <- parse_options
return (opt_help opts)
+-- | Was the "ignore-replies" option passes on the command line?
+ignore_replies_set :: IO Bool
+ignore_replies_set = do
+ opts <- parse_options
+ return (opt_ignore_replies opts)
+
+-- | Was the "ignore-retweets" option passes on the command line?
+ignore_retweets_set :: IO Bool
+ignore_retweets_set = do
+ opts <- parse_options
+ return (opt_ignore_retweets opts)
+
-- |What's the heartbeat?
heartbeat :: IO (Maybe Int)
heartbeat = do