From cca2ef59d3135f735a0f4463be6288713b0a76a2 Mon Sep 17 00:00:00 2001 From: Kacper Date: Wed, 25 May 2022 13:06:30 +0200 Subject: [PATCH] title fix --- app/inspektoratpracy.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/inspektoratpracy.hs b/app/inspektoratpracy.hs index 42c62d2..0e32591 100644 --- a/app/inspektoratpracy.hs +++ b/app/inspektoratpracy.hs @@ -13,15 +13,15 @@ import Text.Printf extractRecords = extractLinksWithText "//td/a[contains(@href,'.pdf')]" toShadowItem :: (String, String) -> ShadowItem -toShadowItem (url, title) = +toShadowItem (url, monthlytitle) = (defaultShadowItem url title) { originalDate = Just date, itype = "periodical", format = Just "pdf", finalUrl = url } - where title = "title" - date = getDate $ replace "%20" " " url + where title = (replace "\r" "" (replace "\n" "" (replace "\t" "" monthlytitle))) + date = getDate $ replace "%20" " " url getDate :: String -> String getDate url = date where