Commit 7cd5fed6 authored by Mael NICOLAS's avatar Mael NICOLAS

correct the abstract=Nothing bug

parent 23a3e2cd
......@@ -128,13 +128,20 @@ parseMedlineCitation = do
parseArticle :: MonadThrow m => ConduitT Event o m PubMedArticle
parseArticle = do
journal <- force "journal" $ manyTagsUntil "Journal" $ do
journal <- force "journal" $
manyTagsUntil "Journal" $ do
j <- manyTagsUntil "Title" content
_ <- many ignoreAnyTreeContent
return j
title <- manyTagsUntil "ArticleTitle" content
abstracts <- manyTagsUntil "Abstract" . many $ do
txt <- tagIgnoreAttrs "AbstractText" content
_ <- many ignoreAnyTreeContent
return txt
-- TODO add authos
authors <- manyTagsUntil "AuthorList" . many $
tagIgnoreAttrs "Author" $ do
ln <- manyTagsUntil "LastName" content
......@@ -146,12 +153,6 @@ parseArticle = do
_ <- many ignoreAnyTreeContent
return Author {lastName=ln, foreName=fn, affiliation=fromMaybe Nothing affi}
abstracts <-
manyTagsUntil "Abstract" . many $ do
txt <- tagIgnoreAttrs "AbstractText" content
_ <- many ignoreAnyTreeContent
return txt
-- TODO add authos
_ <- many ignoreAnyTreeContent
return $ PubMedArticle title journal abstracts authors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment