X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FMain.hs;h=9730f5e33fd9caf28fd69f2013a32cc7e74f3a1c;hb=3835f96aea2f383501071106be0a69abd1ef89d1;hp=b81b6f0e25620092672eddaec5bc3868cab00344;hpb=988f693ce7f1abb6566e75d539ac312b627c31d5;p=dead%2Fhtsn-import.git diff --git a/src/Main.hs b/src/Main.hs index b81b6f0..9730f5e 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -54,6 +54,7 @@ import qualified TSN.InjuriesDetail as InjuriesDetail ( Listing ( player_listings ), Message ( listings ), PlayerListing ) +import qualified TSN.News as News import Xml ( parse_opts ) @@ -91,6 +92,10 @@ import_generic dummy g cfg xml +-- | Import TSN.News from an 'XmlTree'. +import_news :: Configuration -> XmlTree -> IO (Maybe Int) +import_news = undefined + -- | Import TSN.Injuries from an 'XmlTree'. import_injuries :: Configuration -> XmlTree -> IO (Maybe Int) import_injuries = @@ -154,6 +159,7 @@ import_file cfg path = do import_with_dtd (dtd,xml) | dtd == "injuriesxml.dtd" = import_injuries cfg xml | dtd == "Injuries_Detail_XML.dtd" = import_injuries_detail cfg xml + | dtd == "newsxml.dtd" = import_news cfg xml | otherwise = do report_info $ "Unrecognized DTD in " ++ path ++ ": " ++ dtd ++ "." return Nothing