]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/Main.hs
Add a shelltestrunner test suite.
[dead/htsn-import.git] / src / Main.hs
index 10b1acecd0382cba9660198c2d07368ad353eef1..da27b12e9a59ebf8a1e27a4c5fd4a13cf42f85cc 100644 (file)
@@ -172,6 +172,11 @@ import_file cfg path = do
                 let errmsg = "Could not unpickle Odds_XML."
                 maybe (return $ ImportFailed errmsg) migrate_and_import m
 
+            | dtd == "weatherxml.dtd" = do
+                let m = unpickleDoc Weather.pickle_message xml
+                let errmsg = "Could not unpickle weatherxml."
+                maybe (return $ ImportFailed errmsg) migrate_and_import m
+
             | otherwise = do
               let infomsg =
                     "Unrecognized DTD in " ++ path ++ ": " ++ dtd ++ "."
@@ -214,8 +219,8 @@ main = do
   -- deleted.
   let result_pairs = zip (OC.xml_files opt_config) results
   let victims = [ p | (p, True) <- result_pairs ]
-  let imported_count = length victims
-  report_info $ "Imported " ++ (show imported_count) ++ " document(s) total."
+  let processed_count = length victims
+  report_info $ "Processed " ++ (show processed_count) ++ " document(s) total."
   when (remove cfg) $ mapM_ (kill True) victims
 
   where