Generate Html tables from Csv files https://github.com/narrative/hakyll-contrib-csv#readme

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed by Erik Stevenson

Csv to Html table generator for Hakyll

Turns this

1997,Ford,E350,"ac, abs, moon",3000.00
1999,Chevy,"Venture ""Extended Edition""","",4900.00
1999,Chevy,"Venture ""Extended Edition, Very Large""",,5000.00
1996,Jeep,Grand Cherokee,"MUST SELL!
air, moon roof, loaded",4799.00

Into this

            <td>ac, abs, moon</td>
            <td>Venture &quot;Extended Edition&quot;</td>
            <td>Venture &quot;Extended Edition, Very Large&quot;</td>
            <td>Grand Cherokee</td>
            <td>MUST SELL! air, moon roof, loaded</td>


{-# LANGUAGE OverloadedStrings #-}

import Hakyll
import Hakyll.Contrib.Csv

main :: IO ()
main = hakyll $ do

  match "csv/*.csv" $ do
    route $ setExtension "html" `composeRoutes` gsubRoute "csv/" (const "")
    compile $
      >>= loadAndApplyTemplate "templates/layout.html" defaultContext
      >>= relativizeUrls

  match "templates/*" $ compile templateCompiler
Depends on 6 packages:
Used by 1 package:
comments powered byDisqus