Changeset 1161 for lang/haskell
- Timestamp:
- 11/06/07 01:50:00 (13 months ago)
- Files:
-
- 1 modified
-
lang/haskell/blosxkel/blosxkel.hs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/haskell/blosxkel/blosxkel.hs
r1160 r1161 92 92 93 93 94 filterByPathInfo :: String -> [Entry] -> [Entry] 95 filterByPathInfo pathinfo entries 96 | length spath == 2 && 97 all isDigit (spath !! 1) = filter (\e -> (formatCalendarTime defaultTimeLocale "/%Y" (toUTCTime (time e))) == joinPath spath) entries 98 | length spath == 3 && 99 all isDigit (spath !! 1) = filter (\e -> (formatCalendarTime defaultTimeLocale "/%Y/%m" (toUTCTime (time e))) == joinPath spath) entries 100 | length spath == 4 && 101 all isDigit (spath !! 1) = filter (\e -> (formatCalendarTime defaultTimeLocale "/%Y/%m/%d" (toUTCTime (time e))) == joinPath spath) entries 102 | otherwise = filter (\e -> isPrefixOf (joinPath spath) (path e)) entries 103 where 104 spath = splitDirectories pathinfo 105 94 106 getResult :: [(String, String)] -> [(String, String)] -> IO (String, String) 95 107 getResult cgiparams config = do … … 115 127 ("fn" , path e), 116 128 ("path" , path e)]) 117 $ take 7 $ reverse $ sortBy (\a b -> compare (time a) (time b)) entries129 $ take 7 $ reverse $ sortBy (\a b -> compare (time a) (time b)) $ filterByPathInfo (fromJust $ lookup "pathinfo" cgiparams) entries 118 130 ; cf <- fill "foot" [] 119 131 ; return $ (ct, concat $ [ch, concat cs, cf]) … … 121 133 fill place params = fillFlavour "html" place (params ++ [("title" , getConfig config "title"), 122 134 ("author" , getConfig config "author"), 123 ("version", "How I canget this version of GHC in program?")] ++ cgiparams)135 ("version", "How do I get this version of GHC in program?")] ++ cgiparams) 124 136 125 137 cgiMain :: CGI CGIResult
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)