------------------------------------------------------------------------------
-- |
-- Module      : $Header$
  CopyRight    : ( c ) 8c6794b6
-- License     : BSD3
  Maintainer   : 
-- Stability   : unstable
-- Portability : non-portable
--
  Playing with HTML templating in  .
--
module Main where

import Text.StringTemplate

main = do
  body <- readFile "body.txt"
  qs <- lines `fmap` readFile "contents.txt"
  let t = newSTMP body :: StringTemplate String
      qs' = zipWith (\i q -> render $
                       setAttribute "question" q $
                       setAttribute "divid" (show i) $
                       t) [19..] qs
  mapM_ putStrLn qs'

----------------------------------------------------------------------------
 |
 Module      : $Header$
 License     : BSD3
 Stability   : unstable
 Portability : non-portable


  CopyRight    : ( c ) 8c6794b6
  Maintainer   : 
  Playing with HTML templating in  .
module Main where

import Text.StringTemplate

main = do
  body <- readFile "body.txt"
  qs <- lines `fmap` readFile "contents.txt"
  let t = newSTMP body :: StringTemplate String
      qs' = zipWith (\i q -> render $
                       setAttribute "question" q $
                       setAttribute "divid" (show i) $
                       t) [19..] qs
  mapM_ putStrLn qs'
