forked from filipg/twilight-library
title fix
This commit is contained in:
parent
aa45331cf7
commit
cca2ef59d3
@ -13,15 +13,15 @@ import Text.Printf
|
|||||||
extractRecords = extractLinksWithText "//td/a[contains(@href,'.pdf')]"
|
extractRecords = extractLinksWithText "//td/a[contains(@href,'.pdf')]"
|
||||||
|
|
||||||
toShadowItem :: (String, String) -> ShadowItem
|
toShadowItem :: (String, String) -> ShadowItem
|
||||||
toShadowItem (url, title) =
|
toShadowItem (url, monthlytitle) =
|
||||||
(defaultShadowItem url title) {
|
(defaultShadowItem url title) {
|
||||||
originalDate = Just date,
|
originalDate = Just date,
|
||||||
itype = "periodical",
|
itype = "periodical",
|
||||||
format = Just "pdf",
|
format = Just "pdf",
|
||||||
finalUrl = url
|
finalUrl = url
|
||||||
}
|
}
|
||||||
where title = "title"
|
where title = (replace "\r" "" (replace "\n" "" (replace "\t" "" monthlytitle)))
|
||||||
date = getDate $ replace "%20" " " url
|
date = getDate $ replace "%20" " " url
|
||||||
|
|
||||||
getDate :: String -> String
|
getDate :: String -> String
|
||||||
getDate url = date where
|
getDate url = date where
|
||||||
|
Loading…
Reference in New Issue
Block a user