hackage-sparks 0.2 → 0.3
raw patch · 2 files changed
+6/−1 lines, 2 files
Files
- Main.hs +5/−0
- hackage-sparks.cabal +1/−1
Main.hs view
@@ -24,6 +24,7 @@ png1 = "hackage-monthly.png" png2 = "hackage-daily.png"+png3 = "hackage-all.png" graph = barSpark -- { bgColor = rgb 0xEE 0xEE 0xEE } @@ -39,16 +40,20 @@ thismonth = groupBy day . filter (month today) $ dates monthlies = map genericLength permonth dailies = map genericLength thismonth+ alls = reverse. take 90 . reverse $ map genericLength (groupBy (\a b -> month a b && day a b) dates) top = maximum monthlies graph1 <- make (graph { limits = (0,round top) }) monthlies graph2 <- make (graph { limits = (0,20) }) dailies+ graph3 <- make (graph { limits = (0,20) }) alls savePngFile png1 graph1 savePngFile png2 graph2+ savePngFile png3 graph3 putStrLn $ "Wrote: " ++ pwd </> png1 putStrLn $ "Wrote: " ++ pwd </> png2+ putStrLn $ "Wrote: " ++ pwd </> png3 where parse = parseCalendarTime defaultTimeLocale "%c"
hackage-sparks.cabal view
@@ -1,5 +1,5 @@ name: hackage-sparks-version: 0.2+version: 0.3 homepage: http://code.haskell.org/~dons/code/hackage-sparks license: BSD3 license-file: LICENSE