X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FMain.hs;h=da27b12e9a59ebf8a1e27a4c5fd4a13cf42f85cc;hb=1f1b0076266ccb665b7d9470f4ed5f2edbc680a4;hp=10b1acecd0382cba9660198c2d07368ad353eef1;hpb=72d597df08493474acd291dcc8b43409c686b3c4;p=dead%2Fhtsn-import.git diff --git a/src/Main.hs b/src/Main.hs index 10b1ace..da27b12 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -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