]> gitweb.michael.orlitzky.com - dead/halcyon.git/commitdiff
Whitespace cleanup.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 28 Sep 2010 18:25:11 +0000 (14:25 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 28 Sep 2010 18:25:11 +0000 (14:25 -0400)
src/CommandLine.hs
src/Mail.hs
src/Main.hs
src/Twitter/Http.hs
src/Twitter/Status.hs
src/Twitter/User.hs
src/Twitter/Xml.hs

index c5ddb4b48a002213631cbdb32d0f91596a399db1..19b8d1b39a8dd3971624b6923091f6d92f96d97f 100644 (file)
@@ -45,7 +45,7 @@ options =
     Option ['t'][] (ReqArg set_to "email_address") "Send tweets TO email_address.",
     Option ['f'][] (ReqArg set_from "email_address") "Send tweets FROM email_address."
   ]
-  
+
 
 set_help :: Options -> IO Options
 set_help opts = do
@@ -58,7 +58,7 @@ set_to arg opts = do
 set_from :: String -> Options -> IO Options
 set_from arg opts = do
   return opts { opt_from = Just arg }
-         
+
 
 -- The usage header.
 usage :: String
@@ -120,7 +120,7 @@ format_error err = "ERROR: " ++ err ++ "\n"
 parse_errors :: IO [String]
 parse_errors = do
   argv <- getArgs
-  let (_, _, errors) = getOpt Permute options argv  
+  let (_, _, errors) = getOpt Permute options argv
   errs_username <- username_errors
   errs_to <- to_errors
   errs_from <- from_errors
@@ -143,7 +143,7 @@ from_email_address = do
     opts <- parse_options
     return (opt_from opts)
 
-           
+
 parse_usernames :: IO [String]
 parse_usernames = do
   argv <- getArgs
index 2b5445c4ddcbd96020ddb2010b035db1235699d7..c280f1e82d2f6324385d484b6c8570af7989e041 100644 (file)
@@ -27,7 +27,7 @@ instance Show Message where
                  "\n",
                  (body m) ]
 
-        
+
 sendmail :: Message -> IO (String, String, ExitCode)
 sendmail message = do
   let sendmail_args = ["-f",
index 8c2f20bffeea26dff632baf8519d39ca50b8cf99..84536d757e3389319f5edb875965b5871e053342 100644 (file)
@@ -79,8 +79,8 @@ get_latest_status_id username = do
 
 
 run_twat :: Maybe Message -> String -> IO ()
-run_twat message username = do  
-  latest_status_id <- get_latest_status_id username  
+run_twat message username = do
+  latest_status_id <- get_latest_status_id username
   recurse username latest_status_id message
   return ()
 
@@ -123,7 +123,7 @@ main = do
 
   -- Execute run_twat on each username in a new thread.
   mapM (forkIO . (run_twat message)) usernames
-           
+
   forever $ do
     -- This thread (the one executing main) doesn't do anything,
     -- but when it terminates, so do all the threads we forked.
index ddd68284ae91d22f94b7e5beb90a433630a51804..2fe24bdd7c9579738b0d7a05eaa7a94d03b4eaa2 100644 (file)
@@ -4,7 +4,7 @@ where
 import Network.Curl
 import System.IO (hPutStrLn, stderr)
 
---    
+--
 -- http://dev.twitter.com/doc/get/statuses/user_timeline
 --
 user_timeline_url :: String -> String
@@ -19,7 +19,7 @@ user_new_statuses_url username last_status_id =
     concat [ user_timeline_url username,
              "&since_id=" ++ (show last_status_id) ]
 
-                               
+
 get_user_timeline :: String -> IO (Maybe String)
 get_user_timeline username = do
   let uri = (user_timeline_url username)
@@ -33,7 +33,7 @@ get_user_new_statuses username last_status_id = do
   new_statuses <- (http_get uri)
   return new_statuses
 
-         
+
 http_get :: String -> IO (Maybe String)
 http_get uri = withCurlDo $ do
   resp <- curlGetString uri [CurlTimeout 45]
index 275e89352fea47e02c453404474c5e6041bfd110..93b3f4e1cc2621cebac388766d567fa2401a0f0d 100644 (file)
@@ -15,7 +15,6 @@ data Status = Status { status_id  :: Integer,
 
 
 
-              
 status_from_content :: Content -> (Maybe Status)
 status_from_content content =
 
@@ -38,19 +37,19 @@ status_from_content content =
                                   case (reads status_id_data :: [(Integer, String)]) of
                                     []   -> Nothing
                                     parseresult:_ -> Just (Status (fst parseresult) created_at_data all_text user_object)
-               
+
     where
       status_ids = (unique_id content)
       first_status_id = get_char_data (status_ids !! 0)
-      
+
       created_ats = (status_created_at content)
-      first_created_at = get_char_data (created_ats !! 0)      
+      first_created_at = get_char_data (created_ats !! 0)
 
       texts = (status_text content)
       all_text = concat $ catMaybes (map get_char_data texts)
-      
+
       users = (status_user content)
-      first_user = user_from_content (users !! 0)      
+      first_user = user_from_content (users !! 0)
 
 
 
@@ -86,7 +85,7 @@ pretty_print status =
 
 
 get_max_status_id :: [Status] -> Integer
-get_max_status_id statuses =  
+get_max_status_id statuses =
   maximum status_ids
   where
     status_ids = map status_id statuses
\ No newline at end of file
index 75cf4b6f36c3f575ce50830e2abb9f5cee13573a..217ee7ddeed4e223b415d5d175947f9ff2c39dad 100644 (file)
@@ -8,7 +8,7 @@ import Twitter.Xml
 data User = User { screen_name :: String }
           deriving (Show, Eq)
 
-              
+
 user_from_content :: Content -> (Maybe User)
 user_from_content c =
     if (length names) == 0
index 09013bf0cc9b623b7ca8ef3a12aeac31ea467cca..e4cf5aceffa1bff8a1f9e8b5c824702cb5d067fb 100644 (file)
@@ -26,7 +26,7 @@ status_text = keep /> (tag "text") /> txt
 
 status_user :: CFilter
 status_user = keep /> (tag "user")
-              
+
 user_screen_name :: CFilter
 user_screen_name = keep /> (tag "screen_name") /> txt