The Tablify package

[Tags:bsd3, program]

Tool to render CSV into tables of various formats, including HTML, tbl, and character art (both ASCII and Unicode)

[Skip to Readme]


Versions 0.8, 0.8.1, 0.8.2
Dependencies base (<5), parsec (<4), xhtml [details]
License BSD3
Copyright © 2009-2011 Daniel Lyons
Author Daniel Lyons
Maintainer Daniel Lyons <>
Category Text
Home page
Uploaded Thu Apr 21 06:22:06 UTC 2011 by DanielLyons
Distributions NixOS:0.8.2
Downloads 868 total (6 in the last 30 days)
0 []
Status Docs not available [build log]
Last success reported on 2016-10-26 [all 10 reports]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for Tablify

Readme for Tablify-0.8.2

tablify - a simple utility for formatting CSV files.
by Daniel Lyons <>

What it does:

 Tablify is a simple program which does nothing but parse CSV files and render
 them into various display-friendly formats. I spend a fair amount of my time
 dealing with data migration and sometimes it's handy to look at the data
 directly or publish it in such a fashion as other people may find it

 Tablify does not understand every possible CSV format; I took the CSV code
 from the book Real World Haskell. I am not particularly interested in adding
 support for other varieties of CSV because this parser seems to handle the
 common cases and generally if you are getting something else, it's because 
 you asked for something weird. Please let me know if this is not the case for 

 A major rationale for this application was that I noticed that there are some
 nice characters in the Unicode standard for drawing boxes. I used to draw
 boxes for text files like this:

 | Name         | Age |
 | Daniel Lyons | 28  |
 | Reid Givens  | 29  |

 This works OK (it's what MySQL and PostgreSQL's command line clients do,
 after all.) But how much cooler does this look:

 │ name         │ age │
 │ Daniel Lyons │ 28  │
 │ Reid Givens  │ 29  │

 If you have a nice Unicode font like Menlo on your machine, that should look
 freaking awesome. This is what you get using the -U flag. If you want the old
 fugly ASCII table, use -A.

 Anyway, it occurred to me while writing it that I could quite easily support
 a few other formats, so I wrote an HTML output routine and a TBL output
 routine, TBL being part of troff or groff depending on your system.

 The HTML output routine escapes HTML entities (<, > and &). I expect if you
 actually use TBL you will want to tinker with what it gives you. I haven't
 embellished the system with any justification alternatives besides left
 justification; this is really only an issue for the Unicode output option.

 The program assumes that your input and your output are both UTF-8. There are
 utilities you can use such as iconv to fix files coming in or going out if
 that's not your situation. You may specify many files on the command line, or
 - if you want it to read from standard input.



 • GHC (Glasgow Haskell Compiler) —
 • utf8-string library —

These are generally included with GHC:

 • parsec
 • regex-compat
 • haskell98


 Run these three commands ($ represents your shell's prompt):

 $ runhaskell Setup.hs configure
 $ runhaskell Setup.hs build
 $ sudo runhaskell Setup.hs install

 Alternatively, if you have the cabal utility installed, you can run:

 $ cabal configure
 $ cabal build
 $ cabal install

Contacting me:

 If you run into any bugs or think of a feature you'd like me to add, please
 email me at and tell me about it.