hakyll-contrib-csv: Generate Html tables from Csv files

[ bsd3, library, web ] [ Propose Tags ]

A Hakyll extension for incorporating Csv data into your static site.

[Skip to Readme]


[Last Documentation]

  • Hakyll
    • Contrib
      • Hakyll.Contrib.Csv


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,
Dependencies base (<4), blaze-html, bytestring, cassava, hakyll, vector [details]
License BSD-3-Clause
Copyright 2016 Erik Stevenson
Author Erik Stevenson
Maintainer eriknstevenson@gmail.com
Category Web
Home page https://github.com/narrative/hakyll-contrib-csv#readme
Bug tracker https://github.com/narrative/hakyll-contrib-csv/issues
Uploaded by narrative at 2016-05-19T16:10:38Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1847 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-11-25 [all 3 reports]

Readme for hakyll-contrib-csv-

[back to package description]

CSV to HTML table generator

Turn 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

<table width="100%" class="display">
            <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