[Updated readme file. Corrected bug in tag cloud for a single post. Corrected bug in data model for empty content store. prb@mult.ifario.us**20080104073900] { hunk ./README 11 -- GHC 6.8.2 with additional libraries. +- GHC 6.8.2 with additional libraries installed. hunk ./README 20 -- The hslogger package, installed the usual way via the cabal build. - (I will probably do away with this dependency in a future revision.) - Download it from - http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hslogger-1.0.2 - hunk ./README 22 -All of the relevant configurations parameters are in the -Blog.Constants module in the perpubplat library. +All of the relevant configuration parameters are in the +Blog.Constants module in the perpubplat library. hunk ./README 27 -Until I fix the cabal builds: +The libraries and executables all build the standard cabal way, e.g.: + +$ cd perpubplat +$ chmod +x Setup.lhs +$ ./Setup.lhs configure +$ ./Setup.lhs build +$ sudo ./Setup.lhs install + +(Presuming that you want to install for all as opposed to just you.) + +The dependencies are as follows: hunk ./README 39 -$ cd perpubplat_servlet/src -$ ln -s ../../perpubplat/src/* . -$ ghc -threaded -O2 -package fastcgi -package hslogger -o blog.fcgi --make blog.hs +- perpubplat_servlet depends on perpubplat +- perpubplat_import depends on json and perpubplat hunk ./README 44 -Will update soon. +Point your favorite FastCGI web container at perpubplat.fcgi. Some +help selecting and configuring a container is available from here: + +http://mult.ifario.us/p/wiring-haskell-into-a-fastcgi-web-server + +Some sample Apache2 configuration fragments are included in the +repository. + +NB: It is critically important that only one perpubplat.fcgi process +is running at a time, so configure the web container accordingly. + + hunk ./perpubplat/perpubplat.cabal 20 - Blog.Widgets.TagCloud, + Blog.Widgets.TagCloud, Blog.Widgets.FlickrBadge hunk ./perpubplat/src/Blog/Model/Entry.hs 32 +build_model [] = empty hunk ./perpubplat/src/Blog/Widgets/TagCloud.hs 25 - relative_color = \y -> hotness ((d $ y - min_count) / (d $ max_count - min_count)) - relative_size = \y -> 75 + ((75 * (y-min_count)) `div` (max_count - min_count)) + relative_color = if max_count == min_count then + const "#7f7f7f" + else + \y -> hotness ((d $ y - min_count) / (d $ max_count - min_count)) + relative_size = if max_count == min_count then + const 100 + else + \y -> 75 + ((75 * (y-min_count)) `div` (max_count - min_count)) hunk ./perpubplat_servlet/perpubplat_servlet.cabal 16 -ghc-options: -O -Werror -fwarn-unused-binds -fwarn-unused-imports -fwarn-unused-matches +ghc-options: -O2 -threaded -Werror -fwarn-unused-binds -fwarn-unused-imports -fwarn-unused-matches }